Click here to Skip to main content
14,878,669 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more: (untagged)
I have several dropdownlists on my page. The first works as expected and populated the the datasets for the other two and displays them on the screen.

My issue arises once I make a selection from the 2nd and 3rd dropdownlists. It appears that the onSelectedIndexChanged method is not firing.....

<asp:Label ID="Label3" runat="server" Text="Study Selection"></asp:Label>  <br />    <asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="True" onSelectedIndexChanged="displayDefinitions" ><br />    </asp:DropDownList>          <asp:Label <br />        ID="Label1" runat="server" Text="Row Selection" Visible="False"></asp:Label>  <br />    <asp:DropDownList ID="DropDownList1" runat="server" Visible="false" onSelectedIndexChanged="nextStep"  ><br />    </asp:DropDownList>          <asp:Label <br />        ID="Label2" runat="server" Text="Column Selection" Visible="False"></asp:Label>  <br />    <asp:DropDownList ID="DropDownList2" runat="server" Visible="false" onSelectedIndexChanged="nextStep" ><br />    </asp:DropDownList><br />


DropDownList3 works fine.
DropDownList1 and DropDownList2 do not. I can make a selection, but the underlying code is not called.

I'm sure it's going to be something deceptively simple, but I'm just not seeing it.
Thanks for any help offered.
Posted

1 solution

Set AutoPostBack true for DropDownList1 and DropDownList2 as you did in DropDownList3 as below
<br /><asp:DropDownList ID="DropDownList1" runat="server" Visible="false" AutoPostBack="True" onSelectedIndexChanged="nextStep"  ></asp:DropDownList><br /><br /><asp:DropDownList ID="DropDownList2" runat="server" Visible="false" AutoPostBack="True" onSelectedIndexChanged="nextStep"  ></asp:DropDownList><br /><br />


   
  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900