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.
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.
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.
It seems you have to set the ActiveTabIndex to 0 programmatically to make the TabContainer visible.
By the way, I have another error with the tab container.
I add some tab in my tab container programmatically. ie :
QuarterCalculationContainer.Tabs.Clear()
For i As Integer = 0 To yearForecasts.ForecastsList.Count - 1
Dim panel As New TabPanel()
panel.ID = "Panel_" & yearForecasts.ForecastsList.Keys(i).QuarterId & "_" & yearForecasts.ForecastsList.Keys(i).QuarterYear.Value
panel.HeaderText = yearForecasts.ForecastsList.Keys(i).ToString()
Dim table as New Table()
panel.Controls.Add(table)
QuarterCalculationContainer.Tabs.Add(panel)
Next
QuarterCalculationContainer.ActiveTabIndex = 0
It works fine when the page renders for the first time, but in each panel, I have some button.
When I click on one of those buttons, an exception is caught, because the Tab Container has 0 panel, and the ActiveTabIndex is set to 0.
Does anybody know how to make the Tab Container remember of its panels ?
It seems if you embed another ajax control within a panel the entire container does not render. I've had something similar happen when nest a modal popup panel within a tab panel....
I had the some problem this morning and even though my solution may be specifc to my project, I like to share it:
I noticed that style="visibility:hidden;" is always on the TabContainer, even if the thing is displayed, this means the visibilty is turned on by JavaScript. I turned on Firebug in Firefox and noticed that
Sys was 'undefined', meaning something with the loading of the Ajax Javascript libraries didn't work.
I copied the url that loads the libraries into a new browser tab:
And there I got an ASPX error page, in my case this was because I have a custom HTTP module I use for authentication and that did some stuff that didn't work on the *.axd file. So I fixed that so the axd? returned proper JavaScript. After that the tab control
was displayed fine.
So check that all the Ajax JavaScript libraries are loading correctly on your page, if you have this problem.
click2
0 Points
2 Posts
TabContainer always hidden
May 13, 2007 02:46 AM|LINK
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
can any advise me how to fix this please?
Maurice
click2
0 Points
2 Posts
Re: TabContainer always hidden
May 13, 2007 03:18 AM|LINK
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
MisterSaja
Member
30 Points
5 Posts
Re: TabContainer always hidden
Sep 20, 2007 12:58 PM|LINK
I've dynamic TabContainer (in code behind), and yourTabContainer.ActiveTabIndex = 0; helped me to solve this issue.
jimmy q
All-Star
54108 Points
3578 Posts
Re: TabContainer always hidden
Sep 25, 2007 05:09 AM|LINK
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?
jimmy q
All-Star
54108 Points
3578 Posts
Re: TabContainer always hidden
Sep 26, 2007 07:49 AM|LINK
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.
BronwenZande
Member
2 Points
3 Posts
Re: TabContainer always hidden
Jan 18, 2008 05:04 AM|LINK
I have the same problem with the tabcontainer getting hidden. It's happening on IE6 on some (but not every) postback
Any ideas?
officialboss
Member
316 Points
177 Posts
Re: TabContainer always hidden
Feb 18, 2008 03:56 PM|LINK
I have the same problem, of FF and IE7 the Tabs are hidden. Any ideas?
<div> <ajaxToolkit:TabContainer ID="Tabs" runat="server" Width="788px" Height="610px" Visible="true" OnClientActiveTabChanged="ActiveTabChanged"> <ajaxToolkit:TabPanel HeaderText=" List "> First Tab <ContentTemplate>List </ContentTemplate> </ajaxToolkit:TabPanel> <ajaxToolkit:TabPanel HeaderText="Info "> <ContentTemplate>Info </ContentTemplate> </ajaxToolkit:TabPanel> </ajaxToolkit:TabContainer> Current Tab: <asp:Label runat="server" ID="CurrentTab" /><br /> <asp:Label runat="server" ID="Messages" /> </div>This is how it is renderedvdewisme
Member
2 Points
1 Post
Re: TabContainer always hidden
Feb 19, 2008 02:51 PM|LINK
Hello,
It seems you have to set the ActiveTabIndex to 0 programmatically to make the TabContainer visible.
By the way, I have another error with the tab container.
I add some tab in my tab container programmatically. ie :
QuarterCalculationContainer.Tabs.Clear() For i As Integer = 0 To yearForecasts.ForecastsList.Count - 1 Dim panel As New TabPanel() panel.ID = "Panel_" & yearForecasts.ForecastsList.Keys(i).QuarterId & "_" & yearForecasts.ForecastsList.Keys(i).QuarterYear.Value panel.HeaderText = yearForecasts.ForecastsList.Keys(i).ToString() Dim table as New Table() panel.Controls.Add(table) QuarterCalculationContainer.Tabs.Add(panel) Next QuarterCalculationContainer.ActiveTabIndex = 0tab container
aploessl1
Member
616 Points
197 Posts
Re: TabContainer always hidden
Mar 07, 2008 04:31 PM|LINK
It seems if you embed another ajax control within a panel the entire container does not render. I've had something similar happen when nest a modal popup panel within a tab panel....
tweenet
Member
11 Points
6 Posts
Re: TabContainer always hidden
Mar 17, 2008 11:05 AM|LINK
I had the some problem this morning and even though my solution may be specifc to my project, I like to share it:
I noticed that style="visibility:hidden;" is always on the TabContainer, even if the thing is displayed, this means the visibilty is turned on by JavaScript. I turned on Firebug in Firefox and noticed that Sys was 'undefined', meaning something with the loading of the Ajax Javascript libraries didn't work.
I copied the url that loads the libraries into a new browser tab:
http://localhost/ScriptResource.axd?d=if6MgqMBxAvS ....
And there I got an ASPX error page, in my case this was because I have a custom HTTP module I use for authentication and that did some stuff that didn't work on the *.axd file. So I fixed that so the axd? returned proper JavaScript. After that the tab control was displayed fine.
So check that all the Ajax JavaScript libraries are loading correctly on your page, if you have this problem.
TabContainer ajax visibility