I've got a little problem, any help is appreciated.
Situation looks like 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>
// Some content
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlSwitch" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
</ContentTemplate>
</asp:UpdatePanel>
When ddlSwitch selected index change I want to update content inside UP_Switch, but SelectedIndexChanged
event doesn't seem to fire. What am I doing wrong?
Thanks in advance!
I have just tested your code and seems to be working with some test modifications: ASPX
Code behind for
ddlSwitch_SelectedIndexChanged
:Result: