Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 6th, 2009, 07:45 AM
Friend of Wrox
 
Join Date: Aug 2004
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
 
Old May 6th, 2009, 09:09 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

To be more precise, this issue occurs when I add controls to the panel using the code below

Control ctrl = ControlHolder.Page.ParseControl(result);
ControlHolder.Controls.Add(ctrl);

ControlHolder is the panel
resut is the string which I get from XslTransform
__________________
Regards
Mike





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET COntrols inside XSLT sani723 XSLT 8 March 22nd, 2007 07:15 AM
How to get to controls inside DataList? rsearing ASP.NET 2.0 Basics 1 March 1st, 2007 09:14 AM
find all the controls inside any table amartya_mandal ASP.NET 1.0 and 1.1 Professional 10 October 24th, 2006 08:35 AM
CreateUserWizard -access controls inside templates vs .NET Framework 2.0 0 September 13th, 2006 09:01 PM
retaining values of controls inside a datagrid @shish ASP.NET 1.0 and 1.1 Professional 0 March 22nd, 2006 05:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.