Hi everybody,
I tried building a tab control with ajax in asp.net and when I added more tabs the n the page could consist I want it to be apear in new row.
Is there anyone source of tab control in ajax asp.net that support multy rows and look and act like this of xp explorer?
Thanks a lot.
Loading
dafdafPosted Sep 23, 2009, 8:31 AM
Thanks for the answer.
This is exactly what I did and there is a problem with it.
If you give the first div any width and height and the add alot of tabs.
The first tabs will apear in the new line that opened which means in the upper part of the toolbar and the last tab alone in the row that closer to the body of the tab control.
This is not acting like tabcontrol in windows explorer(click properties on any folder in explorer and get tab control -in xp).
Look how this code we did act and how explorer act.
1.Explorer divide the tabs according the place it has and dosn't leave one tab in a row
2.Explorer tab control when selecting a control from the second row(far from the body-upper the body of the control) it brings the second row to be the first row closes to the body of the control.
I would like something like that because it doesn't look nice now.
This is my code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="tabControlWAP._Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>TabContainer Controltitle>
head>
<body "width: 200px;">
<form id="form1" runat="server" >
<div style="border: thick groove #000000; overflow: scroll; width: 400px; height:600px;">
<div id="header">
<h1>
ASP.NET 3.5 Black Bookh1>
div>
<div id="sidebar">
<div id="nav">
div>
div>
<div id="content">
<asp:ScriptManager ID="ScriptManager1" runat="server">
asp:ScriptManager>
<div>
<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="3">
<cc1:TabPanel runat="server" ID="TabPanel1" HeaderText="Getting Started">
<ContentTemplate>
<p>
bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
p>
these is example of list in ajax:
<ul>
<li>Accordionli>
<li>AutoCompleteli>
<li>Calendarli>
<li>DropDownli>
<li>ListSearchli>
<li>ModalPopupli>
<li>ReorderListli>
<li>ValidatorCalloutli>
ul>
ContentTemplate>
cc1:TabPanel>
<cc1:TabPanel runat="server" ID="TabPanel2" HeaderText="Walkthroughs">
<ContentTemplate>
<ul>
<a href=""><li>Dafna example of tab cntrol with multi rowsli>a>
<a href=""><li>Dafna example of tab cntrol with multi rowsli>a>
<a href=""><li>Dafna example of tab cntrol with multi rowsli>a>
<a href=""><li>Dafna example of tab cntrol with multi rowsli>a>
<a href=""><li>Dafna example of tab cntrol with multi rowsli>a>
ul>
ContentTemplate>
cc1:TabPanel>
<cc1:TabPanel runat="server" ID="TabPanel3" HeaderText="Samples">
<ContentTemplate>
<asp:RadioButtonList ID="RadioButtonList1" runat="server">
<asp:ListItem>Dafna example of tab cntrol with multi rowsasp:ListItem>
<asp:ListItem>Dafna example of tab cntrol with multi rowsasp:ListItem>
<asp:ListItem>Dafna example of tab cntrol with multi rowsasp:ListItem>
<asp:ListItem>Dafna example of tab cntrol with multi rowsasp:ListItem>
<asp:ListItem>Dafna example of tab cntrol with multi rowsasp:ListItem>
<asp:ListItem>Dafna example of tab cntrol with multi rowsasp:ListItem>
<asp:ListItem>Dafna example of tab cntrol with multi rowsasp:ListItem>
<asp:ListItem>Dafna example of tab cntrol with multi rowsasp:ListItem>
asp:RadioButtonList>
<asp:Button ID="Button1" runat="server" Text="Go" />
ContentTemplate>
cc1:TabPanel>
<cc1:TabPanel runat="server" ID="TabPanel4" HeaderText="Dafna">
<ContentTemplate>
<asp:RadioButtonList ID="RadioButtonList2" runat="server">
<asp:ListItem>bla bla bla blaasp:ListItem>
<asp:ListItem>bla bla bla bla<asp:ListItem>
<asp:ListItem>bla bla bla bla<asp:ListItem>
<asp:ListItem>bla bla bla bla<asp:ListItem>
<asp:ListItem>bla bla bla bla<asp:ListItem>
<asp:ListItem>bla bla bla bla<asp:ListItem>
<asp:ListItem>bla bla bla bla<asp:ListItem>
<asp:ListItem>bla bla bla bla<asp:ListItem>
asp:RadioButtonList>
<asp:Button ID="Button2" runat="server" Text="Go" />
ContentTemplate>
cc1:TabPanel>
<cc1:TabPanel runat="server" ID="TabPanel5" HeaderText="Dafna1">
<ContentTemplate>
<p>
dafna dafna dafna dafna dafna dafna dafna dafnadafna dafna dafna dafna
dafna dafna dafna dafnadafna dafna dafna dafnadafna dafna dafna dafna
dafna dafna dafna dafnadafna dafna dafna dafnadafna dafna dafna dafna
dafna dafna dafna dafnadafna dafna dafna dafnadafna dafna dafna dafna
dafna dafna dafna dafnadafna dafna dafna dafnadafna dafna dafna dafn
dafna dafna dafna dafnadafna dafna dafna dafnadafna dafna dafna dafna
p>
ContentTemplate>
cc1:TabPanel>
<cc1:TabPanel runat="server" ID="TabPanel6" HeaderText="Dafna2">
<ContentTemplate>
<ul>
<a href=""><li>I have nothing to write anymoreli>a>
<a href=""><li>I have nothing to write anymoreli>a>
<a href=""><li>I have nothing to write anymoreli>a>
<a href=""><li>I have nothing to write anymoreli>a>
<a href=""><li>I have nothing to write anymoreli>a>
ul>
ContentTemplate>
cc1:TabPanel>
cc1:TabContainer>
div>
div>
<div id="footer">
div>
div>
form>
body>
html>