是否有可能在Dropdown SelectedIndexChanged上触发Datalist OnItemDataBound事件?
我正在尝试通过以下代码,但它什么都不做:
protected void drpTopic_SelectedIndexChanged(object sender, EventArgs e)
{
dlSubjects.ItemDataBound +=new DataListItemEventHandler(dlSubjects_ItemDataBound);
}
protected void dlSubjects_ItemDataBound(object sender, DataListItemEventArgs e)
{
// Some Code...
}
请帮我解决问题......
答案 0 :(得分:0)
在SelectedIndexChange
重新绑定您的datalist,因为它会自动触发ItemDataBound
事件