I'm trying to use container controls from the JuiceUI. So far I've played around with the accordion and tabs. They're great controls, but I've having issues updating child controls within these control's "content" tags.
For the accordion, there's a PanelContent tag and for the tabs, there's a TabContent tag, but to make things simpler, we'll focus on the accordion.
Inside of the PanelContent, I have a label. I need to update this label with some info. Since I couldn't access the control directly, I tried casting the control from FindControl on the accordion itself. A NullReferenceException occurred. I also tried the same on the AccordionPanel and the same thing occurred. All of that makes sense.
On VBF, a member pointed out that the label was a child of the PanelContent. It doesn't have an ID property, so I couldn't directly access from the server side code. So I tried accessing it from the AccordionPanel. I could, but didn't have a FindControl method.
So with that, I'm not sure how to access that label from within that PanelContent tag.
Though, when I pull up the PanelContent property from the AccordionPanel, it has one method called InstantiateIn. It's intellisense description is below:
Public Sub InstantiateIn(container As System.Web.UI.Control) When implemented by a class, defines the System.Web.UI.Control object that child controls and templates belong to. These child controls are in turn defined within an inline template.
That sounds like what I need. But I'm not quite sure how to use it. The JuiceUI documentation doesn't seem complete, because I couldn't find anything on there about this.
Any ideas, guys?
Client Side:
<asp:UpdatePanel runat="server">
<ContentTemplate>
<table style="width: 99%;">
<tr>
<td class="style1">
<asp:Label ID="Label1" runat="server" Text="CSO:"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtCSONumber" runat="server" CssClass="UpperCase" Width="115px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style1">
</td>
<td>
<asp:Button ID="btnRetrieve" runat="server" Height="22px" Text="Retrieve" Width="120px" />
</td>
</tr>
<tr>
<td class="style1">
</td>
<td>
<asp:Label ID="lblMessage" runat="server" ForeColor="Red" Text="N/A" Visible="False"></asp:Label>
</td>
</tr>
</table>
<juice:Accordion ID="accSwrlHddRepl" runat="server">
<juice:AccordionPanel runat="server" Title="HDD Information" ID="pnlHddInfo">
<PanelContent>
<p>
<asp:Label ID="lblOriginalHDD" runat="server" Text="N/A"></asp:Label>
</p>
</PanelContent>
</juice:AccordionPanel>
</juice:Accordion>
</ContentTemplate>
</asp:UpdatePanel>