2015-02-07 191 views
-1
enter code![as you can see here the tabs are half eaten!][1] here 

TabContainer的問題與渲染的標籤條

您好,我有一個顯示的標籤條,我不知道什麼是錯的問題。任何人都可以幫忙嗎?當我運行這個標籤沒有完全顯示我有三個選項卡,我試過這與不同的瀏覽器,但問題依然存在。

下面

是代碼的樣本:

<asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" BackColor="#62A5C8" BorderStyle="none" ForeColor="#ffffff" Height="450px" server="" Style=" background-color:#012F54; margin-top: 0px;" Width="100%" ScrollBars="Both" Font-Size="Medium" 
 
ToolTip="Move between tabs to fill-in all information"> 
 

 

 
    <asp:TabPanel runat="server" HeaderText="Student Information" ID="TabPanel1"> 
 
    <ContentTemplate> 
 
     <asp:UpdatePanel ID="updatePanel1" runat="server"> 
 
     <ContentTemplate> 
 
      <table class="auto-style15"> 
 
      <tr> 
 
       <td class="auto-style27"> 
 
       <br /> 
 
       <span class="auto-style117">First Name:<br /> </span> 
 
       </td> 
 
       <td class="auto-style21"> 
 
       <br /> 
 
       <strong>&nbsp; 
 
          <asp:TextBox ID="TextBox1" runat="server" BorderColor="Black" BorderStyle="Solid" Height="23px" Width="198px" CssClass="auto-style116"></asp:TextBox> 
 
          </strong> 
 
       </td> 
 
       <td>&nbsp;</td> 
 
      </tr> 
 
      <tr> 
 
       <td class="auto-style28">&nbsp;</td> 
 
       <td class="auto-style21">&nbsp;</td> 
 
       <td>&nbsp;</td> 
 
      </tr> 
 
      <tr> 
 
       <td class="auto-style117">Last Name:</td> 
 
       <td class="auto-style24"><strong> 
 
          &nbsp; 
 
          <asp:TextBox ID="TextBox2" runat="server" BorderStyle="Solid" Height="21px" Width="198px" BorderColor="Black" CssClass="auto-style116"></asp:TextBox> 
 
          </strong> 
 
       </td> 
 
       <td class="auto-style25"></td> 
 
      </tr> 
 
      <tr> 
 
       <td class="auto-style17"></td> 
 
       <td class="auto-style20"></td> 
 
       <td class="auto-style18"></td> 
 
      </tr> 
 
      <tr> 
 
       <td class="auto-style27" style="font-size: small; color: #043d5d">Student ID:</td> 
 
       <td class="auto-style21"><strong> 
 
          &nbsp; 
 
          <asp:TextBox ID="TextBox3" runat="server" BorderStyle="Solid" Height="23px" Width="198px" BorderColor="Black" CssClass="auto-style116"></asp:TextBox> 
 
          </strong> 
 
       </td> 
 
       <td>&nbsp;</td> 
 
      </tr> 
 
      <tr> 
 
       <td class="auto-style28">&nbsp;</td> 
 
       <td class="auto-style21">&nbsp;</td> 
 
       <td>&nbsp;</td> 
 
      </tr> 
 
      <tr> 
 
       <td class="auto-style27" style="font-size: small; color: #043d5d">Department:</td> 
 
       <td class="auto-style21"><strong> 
 
          <asp:DropDownList ID="DropDownList1" runat="server" Height="27px" Width="295px" style="margin-left:7px;"> 
 
              <asp:ListItem>Cardiac Technology</asp:ListItem> 
 
              <asp:ListItem>Clinical Laboratory Sciences</asp:ListItem> 
 
              
 
             </asp:DropDownList> 
 
          </strong> 
 
       </td> 
 
       <td>&nbsp;</td> 
 
      </tr> 
 
      <tr> 
 
       <td class="auto-style28">&nbsp;</td> 
 
       <td class="auto-style21">&nbsp;</td> 
 
       <td>&nbsp;</td> 
 
      </tr> 
 
      <tr> 
 
       <td class="auto-style28">&nbsp;</td> 
 
       <td class="auto-style21">&nbsp;</td> 
 
      </tr> 
 
      <tr> 
 
       <td class="auto-style28">&nbsp;</td> 
 
       <td class="auto-style21">&nbsp;</td> 
 
      </tr> 
 
      <tr> 
 
       <td class="auto-style28">&nbsp;</td> 
 
       <td class="auto-style21">&nbsp;</td> 
 

 
       <td> 
 
       <asp:Button ID="Button1" runat="server" BackColor="#4DA3B0" BorderColor="#4DA3B0" Font-Bold="False" Font-Size="12pt" ForeColor="White" Height="36px" style="margin-left:10px;" Text="Next ►" Width="166px" /> 
 
       </td> 
 
      </tr> 
 
      </table> 
 
     </ContentTemplate> 
 
     </asp:UpdatePanel> 
 
    </ContentTemplate> 
 
    </asp:TabPanel> 
 

 
    <asp:TabPanel ID="TabPanel2" runat="server" HeaderText="Graduate Form"> 
 
    <ContentTemplate>
**

回答

0

下面的代碼 嗨兄弟第一次使用在頁面

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> 

的頂部添加refrence然後使用以下代碼

<asp:ScriptManager runat="server" ID="sc"> 
     </asp:ScriptManager> 
     <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" BackColor="#62A5C8" 
      BorderStyle="none" ForeColor="#ffffff" Height="450px" server="" Style="background-color: #012F54; 
      margin-top: 0px;" Width="100%" ScrollBars="Both" Font-Size="Medium" ToolTip="Move between tabs to fill-in all information"> 
      <asp:TabPanel runat="server" HeaderText="Student Information" ID="TabPanel1"> 
       <ContentTemplate> 
        <table class="auto-style15"> 
         <tr> 
          <td class="auto-style27"> 
           <br /> 
           <span class="auto-style117">First Name:<br /> 
           </span> 
          </td> 
          <td class="auto-style21"> 
           <br /> 
           <strong>&nbsp; 
            <asp:TextBox ID="TextBox1" runat="server" BorderColor="Black" BorderStyle="Solid" 
             Height="23px" Width="198px" CssClass="auto-style116"></asp:TextBox> 
           </strong> 
          </td> 
          <td> 
           &nbsp; 
          </td> 
         </tr> 
         <tr> 
          <td class="auto-style28"> 
           &nbsp; 
          </td> 
          <td class="auto-style21"> 
           &nbsp; 
          </td> 
          <td> 
           &nbsp; 
          </td> 
         </tr> 
         <tr> 
          <td class="auto-style117"> 
           Last Name: 
          </td> 
          <td class="auto-style24"> 
           <strong>&nbsp; 
            <asp:TextBox ID="TextBox2" runat="server" BorderStyle="Solid" Height="21px" Width="198px" 
             BorderColor="Black" CssClass="auto-style116"></asp:TextBox> 
           </strong> 
          </td> 
          <td class="auto-style25"> 
          </td> 
         </tr> 
         <tr> 
          <td class="auto-style17"> 
          </td> 
          <td class="auto-style20"> 
          </td> 
          <td class="auto-style18"> 
          </td> 
         </tr> 
         <tr> 
          <td class="auto-style27" style="font-size: small; color: #043d5d"> 
           Student ID: 
          </td> 
          <td class="auto-style21"> 
           <strong>&nbsp; 
            <asp:TextBox ID="TextBox3" runat="server" BorderStyle="Solid" Height="23px" Width="198px" 
             BorderColor="Black" CssClass="auto-style116"></asp:TextBox> 
           </strong> 
          </td> 
          <td> 
           &nbsp; 
          </td> 
         </tr> 
         <tr> 
          <td class="auto-style28"> 
           &nbsp; 
          </td> 
          <td class="auto-style21"> 
           &nbsp; 
          </td> 
          <td> 
           &nbsp; 
          </td> 
         </tr> 
         <tr> 
          <td class="auto-style27" style="font-size: small; color: #043d5d"> 
           Department: 
          </td> 
          <td class="auto-style21"> 
           <strong> 
            <asp:DropDownList ID="DropDownList1" runat="server" Height="27px" Width="295px" Style="margin-left: 7px;"> 
             <asp:ListItem>Cardiac Technology</asp:ListItem> 
             <asp:ListItem>Clinical Laboratory Sciences</asp:ListItem> 
            </asp:DropDownList> 
           </strong> 
          </td> 
          <td> 
           &nbsp; 
          </td> 
         </tr> 
         <tr> 
          <td class="auto-style28"> 
           &nbsp; 
          </td> 
          <td class="auto-style21"> 
           &nbsp; 
          </td> 
          <td> 
           &nbsp; 
          </td> 
         </tr> 
         <tr> 
          <td class="auto-style28"> 
           &nbsp; 
          </td> 
          <td class="auto-style21"> 
           &nbsp; 
          </td> 
         </tr> 
         <tr> 
          <td class="auto-style28"> 
           &nbsp; 
          </td> 
          <td class="auto-style21"> 
           &nbsp; 
          </td> 
         </tr> 
         <tr> 
          <td class="auto-style28"> 
           &nbsp; 
          </td> 
          <td class="auto-style21"> 
           &nbsp; 
          </td> 
          <td> 
           <asp:Button ID="Button1" runat="server" BackColor="#4DA3B0" BorderColor="#4DA3B0" 
            Font-Bold="False" Font-Size="12pt" ForeColor="White" Height="36px" Style="margin-left: 10px;" 
            Text="Next ►" Width="166px" /> 
          </td> 
         </tr> 
        </table> 
       </ContentTemplate> 
      </asp:TabPanel> 
      <asp:TabPanel ID="TabPanel2" runat="server" HeaderText="Graduate Form"> 
       <ContentTemplate> 
       </ContentTemplate> 
      </asp:TabPanel> 
     </asp:TabContainer> 
+0

@ user123試過但沒有工作:( – Ramsh 2015-02-08 21:31:20

+0

請粘貼你的Html代碼以獲得更好的答案 – User125 2015-02-09 05:20:27