public partial class _Default : System
{
protected string title="大家好"; //前台代碼<title><%#title %></title>
protected void Page_Load(object sender
{
DataSet ds = new DataSet();
string sql = ConfigurationManager
using (SqlConnection sqlCnn=new SqlConnection(sql))
{
using (SqlCommand sqlCmm=sqlCnn
{
sqlCmm
SqlDataAdapter adapter = new SqlDataAdapter(sqlCmm);
adapter
}
this
this
this
//this
this
this
this
//this
this
} //數據綁定到RadioButtonList
if (!IsPostBack)
{
DataSet ds
using (SqlConnection sqlCnn
{
using (SqlCommand sqlCmm
{
sqlCmm
SqlDataAdapter adapter = new SqlDataAdapter(sqlCmm
adapter
this
this
this
this
}
}
}
}
protected void DropDownList
{
DataSet ds = new DataSet();
string str = ConfigurationManager
using (SqlConnection sqlCnn = new SqlConnection(str))
{
using (SqlCommand sqlCmm = sqlCnn
{
sqlCmm
SqlDataAdapter adapter = new SqlDataAdapter(sqlCmm);
adapter
this
this
this
this
}
}
}//實現省市二級聯動
}
From:http://tw.wingwit.com/Article/program/net/201311/14140.html