Wednesday, March 21, 2012

loading dynamic with tabs

Hello!

I have page with number of gridviews and information that case delay in page load ... I want to split it in tabs .. but does Tab Container load the tabs at time of page load or when click on a tab?

you can add the tabs at runtime..

following is the code..

Code behind.

protected void Page_Load(object sender, EventArgs e) { mytabContainer.Tabs[0].HeaderText ="My first Tab"; AjaxControlToolkit.TabPanel tb =new AjaxControlToolkit.TabPanel(); tb.HeaderText ="My second tab"; mytabContainer.Tabs.Add(tb); AjaxControlToolkit.TabPanel tb1 =new AjaxControlToolkit.TabPanel(); tb1.HeaderText ="my third tab"; mytabContainer.Tabs.Add(tb1); }

and html is

 
 <asp:ScriptManager ID="scriptmanager" runat="server"> </asp:ScriptManager> <cc1:TabContainer ID="mytabContainer" runat="server" ActiveTabIndex="0"> <cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="TabPanel1"> </cc1:TabPanel> </cc1:TabContainer>

No comments:

Post a Comment