Juice UI - Textbox inside accordion issue

toshalim

New Member
I'm unable to retrieve the content of a textbox that's inside an accordion panel. My markup is as follows:\[code\]<juice:Accordion ID="Accordion1" runat="server"><juice:AccordionPanel ID="AccordionPanel1" runat="server" Title="Media ID"><PanelContent> <asp:Label ID="LabelMediaID" runat="server" Text="Media ID" AssociatedControlID="TextBoxMediaID"></asp:Label> <asp:TextBox ID="TextBoxMediaID" runat="server"></asp:TextBox></PanelContent></juice:AccordionPanel>\[/code\]My server side code is triggered when the user clicks a button:\[code\]protected void ButtonSearch_Click(object sender, EventArgs e){ // Retrieve controls within accordion panels TextBox TextBoxMediaID = (TextBox)AccordionPanel1.FindControl("TextBoxMediaID"); string mediaID= "abc"; if (TextBoxMediaID != null) mediaID= TextBoxMediaID.Text;\[/code\]I'm able to successfully retrieve my textbox control but when I try to access its Text property it's always empty. Can someone help me? I'm afraid I'm reasonably new to the world of ASP.NET, Juice etc. Thanks.
 
Back
Top