Showing posts with label ltajaxtoolkittabcontainer. Show all posts
Showing posts with label ltajaxtoolkittabcontainer. Show all posts

Saturday, March 24, 2012

TabContainer always hidden

hi there,

my tabcontainer is always rendered as hidden.

this is the asp code

 <td class="text1"> <ajaxToolkit:TabContainer runat="server" ID="TabContainer1" Visible="true"> <ajaxToolkit:TabPanel runat="server" ID="TabPanel1" HeaderText="TabPanel1"> <ContentTemplate> TabPanel1 </ContentTemplate> </ajaxToolkit:TabPanel> <ajaxToolkit:TabPanel runat="server" ID="TabPanel2" HeaderText="TabPanel2"> <ContentTemplate> TabPanel2 </ContentTemplate> </ajaxToolkit:TabPanel> <ajaxToolkit:TabPanel runat="server" ID="TabPanel3" HeaderText="TabPanel3"> <ContentTemplate> TabPanel3 </ContentTemplate> </ajaxToolkit:TabPanel> </ajaxToolkit:TabContainer> </td>

and this is how it renders

<td class="text1"> <div class="ajax__tab_xp" id="ctl00_ContentPlaceHolder1_TabContainer1" style="visibility:hidden;"><div id="ctl00_ContentPlaceHolder1_TabContainer1_header"><span id="__tab_ctl00_ContentPlaceHolder1_TabContainer1_TabPanel1">TabPanel1</span><span id="__tab_ctl00_ContentPlaceHolder1_TabContainer1_TabPanel2">TabPanel2</span><span id="__tab_ctl00_ContentPlaceHolder1_TabContainer1_TabPanel3">TabPanel3</span></div><div id="ctl00_ContentPlaceHolder1_TabContainer1_body"><div id="ctl00_ContentPlaceHolder1_TabContainer1_TabPanel1"> TabPanel1 </div><div id="ctl00_ContentPlaceHolder1_TabContainer1_TabPanel2" style="display:none;visibility:hidden;"> TabPanel2 </div><div id="ctl00_ContentPlaceHolder1_TabContainer1_TabPanel3" style="display:none;visibility:hidden;"> TabPanel3 </div></div></div> </td>

can any advise me how to fix this please?

Maurice

it may be obvious to most people but the first div is meant to have the style="visibility:hidden;" but the control is never rendered to the screen, i.e. i cant see the tabs.

Maurice


I've dynamic TabContainer (in code behind), andyourTabContainer.ActiveTabIndex = 0; helped me to solve this issue.


I also have this same problem where the tabcontainer and its tabpanels are always hidden. The HTML markup is all there when you view source of the page but the container and panels have a style attribute of visibility:hidden.

This displays fine in IE6 but under Firefox 1.5.0.12 the tabs are always hidden.

Does any one have any ideas why it does this?


I managed to fix my problem.

The problem was I had a calendar extender control within the tabpanel that had its ondateselection property set. For some unknown reason with that property set, Firefox refuses to display the tabcontainer.

Wednesday, March 21, 2012

TabContainer is get back to the first tab each page load

who to fix it?

<ajaxToolkit:TabContainer ID="TabContainer1" runat="server" Height="150px" ActiveTabIndex="0"> <ajaxToolkit:TabPanel ID="TabPanel1" runat="server" HeaderText="???? ????" > <ContentTemplate> <uc1:Clientdetails ID="Clientdetails1" runat="server" /> </ContentTemplate> </ajaxToolkit:TabPanel> <ajaxToolkit:TabPanel ID="TabPanel2" runat="server" HeaderText="?????"> <ContentTemplate> <uc2:CommentsList ID="CommentsList1" runat="server" /> </ContentTemplate> </ajaxToolkit:TabPanel> <ajaxToolkit:TabPanel ID="TabPanel3" runat="server" HeaderText="??????"> <ContentTemplate> <uc3:ClientsOrder ID="ClientsOrder1" runat="server" /> </ContentTemplate> </ajaxToolkit:TabPanel> </ajaxToolkit:TabContainer>

is there other easy way to do it except using session

is there other easy way to do it except using session>?

well i am kinda new to this myself. But i think removing the ActiveTabIndex="0" property might help, since every page refresh it reads that property again and set the active tab to 0. Thus your first tab.


Hi Roy,

I'm afraid the information you provided isn't sufficient enough to solve it.

I copied your code into my page, but can't reproduce it.

<%@. Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head id="Head1" runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <ajaxToolkit:TabContainer ID="TabContainer1" runat="server" Height="150px" ActiveTabIndex="0"> <ajaxToolkit:TabPanel ID="TabPanel1" runat="server" HeaderText="???? ????" > <ContentTemplate> <asp:Button ID="Button1" runat="server" Text="Button" /> </ContentTemplate> </ajaxToolkit:TabPanel> <ajaxToolkit:TabPanel ID="TabPanel2" runat="server" HeaderText="?????"> <ContentTemplate> <asp:Button ID="Button2" runat="server" Text="Button" /> </ContentTemplate> </ajaxToolkit:TabPanel> <ajaxToolkit:TabPanel ID="TabPanel3" runat="server" HeaderText="??????"> <ContentTemplate> <asp:Button ID="Button3" runat="server" Text="Button" /> </ContentTemplate> </ajaxToolkit:TabPanel> </ajaxToolkit:TabContainer> </form></body></html>