asp.net - Initial SelectedValue in DropDownList not posting back when re-selected -


i have dropdownlist following markup:

<asp:updatepanel id="updatepanel1" runat="server" childrenastriggers="true" updatemode="always">     <contenttemplate>         <asp:dropdownlist id="ddlcampaignmodule" runat="server" onselectedindexchanged="ddldynamictype_selectedindexchanged" autopostback="true">             <asp:listitem value="-1">none</asp:listitem>             <asp:listitem value="10">category menu</asp:listitem>             <asp:listitem value="11">best sellers</asp:listitem>             <asp:listitem value="12">best reviews</asp:listitem>         </asp:dropdownlist>     </contenttemplate> </asp:updatepanel> 

in code behind select second option category menu. if run code , select other option posts ddldynamictype_selectedindexchanged if re-select second option (after selecting 1 of other ones) postback isn't triggered.

am missing simple here?

sounds selecting 2nd option in code behind, regardless of postback... ensure if isn't!

if (!ispostback) {     //select 2nd item } 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -