Tuesday, April 19, 2011

ASP.NET: DropDownList do not fire onselectdindexchanged

I add a DropDownList in a web page and the setting is shown below:
<asp:DropDownList ID="DropDownList1" runat="server" Height="35px"             onselectedindexchanged="DropDownList1_SelectedIndexChanged" Width="184px"              style="margin-right: 38px">
When I change the value in the DropDownList, it do not trigger the onselectedindexchange method. After some searching, i need to add attribute AutoPostBack
AutoPostBack="true"

No comments:

Post a Comment