View Single Post
  #1 (permalink)  
Old May 6th, 2009, 07:45 AM
mike_remember mike_remember is offline
Friend of Wrox
Points: 1,935, Level: 17
Points: 1,935, Level: 17 Points: 1,935, Level: 17 Points: 1,935, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2004
Location: United Kingdom
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default 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