locked
Tab Container not visible RRS feed

  • Question

  • User-883855585 posted

    I am trying to add a TabContainer to a blank page but it will not show.  There are no error messages but nothing will show on the page.

    <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
              
    
    <asp:ScriptManager ID="ScriptManager1" runat="server">
     
                </asp:ScriptManager>
     
            <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" 
    
                    width="500px">
     
                <asp:TabPanel runat="server" ID="TabPanel1"> 
    
                <HeaderTemplate>
     
                <div class="tabsize">Contact Us</div>
     
                </HeaderTemplate>          
    
                <ContentTemplate>             

    I even tried a TabContainer from a working page but it would not display either.

     

    Thursday, November 19, 2015 8:43 AM

Answers

  • User603616845 posted

    Hi,

    I think you need to use ActiveTabIndex=1

    or you can try this code..

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TabContainer.aspx.cs" Inherits="AjaxTabContainer.TabContainer" %>  
      
    <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>  
      
    <!DOCTYPE html>  
      
    <html xmlns="http://www.w3.org/1999/xhtml">  
    <head runat="server">  
        <title></title>  
    </head>  
    <body>  
        <form id="form1" runat="server">  
        <div>  
          
            <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">  
            </asp:ToolkitScriptManager>  
            <br />  
            <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="1" Height="40px" Width="241px">  
                <asp:TabPanel runat="server" HeaderText="Login Form" ID="TabPanel1">  
                </asp:TabPanel>  
                <asp:TabPanel ID="TabPanel2" runat="server" HeaderText="Registration Form">  
                </asp:TabPanel>  
            </asp:TabContainer>  
          
        </div>  
        </form>  
    </body>  
    </html>  

    Hope this will help you.

    thanks

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, November 19, 2015 8:59 AM