Wednesday, May 13, 2015

Asp .Net Ajax TabContainer , TabPanel

Introduction:
In this article I will explain how to use Tabs in ASP .Net using Ajax Toolkit controls TabContainer and TabPanel.


Description:
Asp TabContainer has few properties such as TabStripPlacement and UseVerticalStripPlacement as the name says it all we need to specify the TabStripPlacement = "Top"  and UseVerticalStripPlacement = "False" In order to place the tabs horizontally over the top of the page.
Then the next control to be placed inside the TabContainer is TabPanel it contains HeaderText Property in which we can specify the name of the tab that will display in Tabs.

<asp:Panel ID="pnlapplication" runat="server">

<asp:TabContainer ID="TabContainer1" runat="server" TabStripPlacement="Top" UseVerticalStripPlacement="false" ActiveTabIndex="5" Style="margin-top: 0px;">
<asp:TabPanel ID="TPBasicInfo" runat="server" HeaderText="Lead Information" Enabled="true">
<ContentTemplate>
<table cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse; width: 100%;" align="center">
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse;"
 align="center" class="ApplicationTabContainer">
<tr>
<td class="tab_header"> Lead Information </td>

<fieldset class="Fieldsetcontainer">
<legend>Lead Details</legend>
<table cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse;
background-color: WHITE; width: 100%;" align="center">
 <tr>
<td class="headlabel">
Lead No
 </td>
 <td class="contentlabel"> <asp:Label ID="LblLeadNo" runat="server"></asp:Label>
</td>
 <td>
 &nbsp;&nbsp;
 </td>
 <td class="headlabel">
Lead Date
</td>
<td class="contentlabel"> <asp:Label ID="LblLeadDt" runat="server"></asp:Label>
</td>
</tr>
</asp:TabPanel>
</asp:TabContainer>
</asp:Panel>

No comments :

Post a Comment