protected void dd_State_SelectedIndexChanged(object sender, EventArgs e)
{
DataView dv_City = dt_City.DefaultView;
dv_City.RowFilter = "StateID='" + dd_State.SelectedValue + "'";
dv_City.Sort = "DistrictName";
dd_City.DataSource = dv_City;
dd_City.DataTextField = "DistrictName";
dd_City.DataValueField = "DistrictId";
dd_City.DataBind();
dd_City.Items.Insert(0, "--Select City--");
}
我已将autopostback
设为true并启用viewstate
为true。仍然在调试时它不会去下拉选择索引。事件不会发生。