asp.net - UpdatePanel AsyncPostbackTrigger not firing -


i've got little problem, appreciated.

situation looks this:

<asp:updatepanel id="up_panel" runat="server" updatemode="conditional">     <contenttemplate>         <asp:dropdownlist id="ddlswitch" runat="server" width="250px" autopostback="true"             onselectedindexchanged="ddlswitch_selectedindexchanged">              <asp:listitem value="continent" text="continent"></asp:listitem>             <asp:listitem value="region" text="region"></asp:listitem>             <asp:listitem value="country" text="country"></asp:listitem>          </asp:dropdownlist>          <asp:updatepanel id="up_switch" runat="server" updatemode="conditional">             <contenttemplate>                 // content             </contenttemplate>             <triggers>                 <asp:asyncpostbacktrigger controlid="ddlswitch" eventname="selectedindexchanged" />             </triggers>         </asp:updatepanel>     </contenttemplate> </asp:updatepanel> 

when ddlswitch selected index change want update content inside up_switch, selectedindexchanged event doesn't seem fire. doing wrong?

thanks in advance!

i have tested code , seems working test modifications: aspx

<asp:updatepanel id="up_panel" runat="server" updatemode="conditional">     <contenttemplate>         <asp:dropdownlist id="ddlswitch" runat="server" width="250px" autopostback="true"             onselectedindexchanged="ddlswitch_selectedindexchanged">              <asp:listitem value="continent" text="continent"></asp:listitem>             <asp:listitem value="region" text="region"></asp:listitem>             <asp:listitem value="country" text="country"></asp:listitem>          </asp:dropdownlist>          <asp:updatepanel id="up_switch" runat="server" updatemode="conditional">             <contenttemplate>                 <asp:literal id="litupswitch" runat="server"></asp:literal>             </contenttemplate>             <triggers>                 <asp:asyncpostbacktrigger controlid="ddlswitch" eventname="selectedindexchanged" />             </triggers>         </asp:updatepanel>     </contenttemplate> </asp:updatepanel> 

code behind ddlswitch_selectedindexchanged:

protected void ddlswitch_selectedindexchanged(object sender, eventargs e) {     litupswitch.text = "ddl switch go activated"; } 

result:


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -