<asp:DropDownList runat="server" ID="myListDropDown" CssClass="text" OnSelectedIndexChanged="myListDropDown_Change" />
There's the aspx above
protected void myListDropDown_Change(object sender, EventArgs e)
{
//stuff that never gets hit
}
I put a break point on the myListDropDown method but it never gets hit. Any suggestions?
Set AutoPostBack
property of your DropDownList
control to true
.
<asp:DropDownList AutoPostBack="true" runat="server" ID="myListDropDown"
CssClass="text" OnSelectedIndexChanged="myListDropDown_Change" />
DropDownList的Autopostback属性需要设置为“true”。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.