Is this a known behavior? and if it is how do I make it work?
I have 2 update panels. Each one has a DropDownList control inside of it.
I have 1 button that sets-up (binds) the first DropDownList. This works.
When I change the 1st DropDownList, it should update the 2nd DropDownList.
For some reason, the 2nd dropdown list never gets updated.
Here is the pseudo--code:
1st Update Panel & DropDownList:
<asp:Button ID="btnSet" runat="server"></asp:Button>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:DropDownList ID="DropDownList1" runat="server"
onselectedindexchanged="DropDownList1_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnSet" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:DropDownList ID="DropDownList2" runat="server"></asp:DropDownList>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="DropDownList1" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
Code Behind:
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
BindSecondDropDownList();
}
Help me figure this one out.