im trying to get the value of a dropdownlist and insert it into a label inside an update panel like the following:
<asp:UpdatePanel ID="udpTutorialDropDown" runat="server"><ContentTemplate><asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="TutorialSeries" DataTextField="SeriesName" DataValueField="VideoSeriesNameID" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"></asp:DropDownList><br /><asp:SqlDataSource ID="TutorialSeries" runat="server" ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" SelectCommand="ViewSeasonName" SelectCommandType="StoredProcedure"></asp:SqlDataSource><asp:Label ID="lblEpisode" runat="server" Text="Label"></asp:Label><br /><asp:TextBox ID="tbxURL" runat="server"></asp:TextBox><br /><asp:TextBox ID="tbxDiscription" runat="server"></asp:TextBox><br /></ContentTemplate><Triggers><asp:AsyncPostBackTrigger ControlID="DropDownList1" EventName="SelectedIndexChanged" /></Triggers></asp:UpdatePanel>
and at code behind i have:
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { lblEpisode.Text = DropDownList1.SelectedValue.ToString(); udpTutorialDropDown.Update(); }
but i dont know why it doesnt update the label!! the text of the label remains the same as when it loads which is "Label" !!! can someone spot the problem??