How to fire OnIndexChanged event of Dropdownlist in asp.net

Sometimes people working with asp dropdownlists < asp:DropDownList runat="server"> feel very angry when OnIndexChanged() event of asp dropdownlist not fire. People go to debug and they feel more angry when they find that debugger is not going to OnIndexChanged() event of asp dropdownlist.

The reason why OnIndexChanged() event of dropdownlist not fire is the missing of
autopastback="true" attribute in the asp dropdown list, so here is the solution


<asp:DropDownList ID="ddl_SearchOption" runat="server" autopastback="true">


So this is the way to fire the OnIndexChanged event of Dropdownlist in asp.net

0 comments: