【发布时间】:2011-06-20 17:46:14
【问题描述】:
<asp:DropDownList runat="server" ID="myListDropDown" CssClass="text" OnSelectedIndexChanged="myListDropDown_Change" />
上面有aspx
protected void myListDropDown_Change(object sender, EventArgs e)
{
//stuff that never gets hit
}
我在 myListDropDown 方法上设置了一个断点,但它永远不会被命中。有什么建议吗?
【问题讨论】:
-
应该是
myListDropDown_SelectedIndexChanged()。见这里msdn.microsoft.com/en-us/library/… -
@Rahul 事件处理程序的名称无关紧要。
-
@Rahul myListDropDown_SelectedIndexChanged() 可能更有意义,但没关系。不过感谢您的参与。