Dynamic controls inside a ajax:tabpanel
Hi
I have an ajax:tabcontainer with 2 tabpanels, one has an <asp:panel> in which I am creating and rendering some dynamic controls on server side. Now the problem is that once these dynamic controls are loaded in the first tab panel, the contents of second tab panel are not shown, if I view the source of page, the content of second tab panel is hidden as style="visibility:hidden;display:none;", example of my code is as below
<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" >
<cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="TabPanel4">
<HeaderTemplate>
First tab
</HeaderTemplate>
<ContentTemplate>
<ASP:PANEL runat="server" Height="100%" id="DynamicPanel"></ASP:PANEL>
</ContentTemplate>
</cc1:TabPanel>
<cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel4">
<HeaderTemplate>
Second Tab
</HeaderTemplate>
<ContentTemplate>
<ccc:usercontrol />
</ContentTemplate>
</cc1:TabPanel>
</cc1:TabContainer>
protected override void OnInit(EventArgs e)
{
//Code to create dynamic control and add them to the second tab's panel
//DynamicPanel
}
__________________
Regards
Mike
|