Reputation: 647
<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?
Upvotes: 21
Views: 80591
Reputation: 3218
Autopostback property of the DropDownList needs to be set to 'true'.
Upvotes: 6
Reputation: 108957
Set AutoPostBack
property of your DropDownList
control to true
.
<asp:DropDownList AutoPostBack="true" runat="server" ID="myListDropDown"
CssClass="text" OnSelectedIndexChanged="myListDropDown_Change" />
Upvotes: 38