net中,在Datalist 中使用了dropdownlist邦定数据,怎么找到DropDownList1_SelectedIndexChanged事件?

来源:百度知道 编辑:UC知道 时间:2024/09/28 10:01:30
net中,在Datalist 中使用了dropdownlist邦定数据,怎么找到DropDownList1_SelectedIndexChanged事件?

你要写事件委托函数代码?那和其它控件没有区别啊。
你如果想找到第index个Item的DropDownList,可以在代码中
DropDownList ddl=(DropDownList)DataList1.Items[index].FindControl("DropDownList1");

DropDownList1.DataTextField = "mnnames";
DropDownList1.SelectedIndex = 2;
DropDownList1.DataSource= ds;
DropDownList1.DataBind();