Wednesday, May 13, 2015

Asp .Net Ajax TabContainer , TabPanel

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

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">
<table cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse; width: 100%;" align="center">
<table cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse;"
 align="center" class="ApplicationTabContainer">
<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">
<td class="headlabel">
Lead No
 <td class="contentlabel"> <asp:Label ID="LblLeadNo" runat="server"></asp:Label>
 <td class="headlabel">
Lead Date
<td class="contentlabel"> <asp:Label ID="LblLeadDt" runat="server"></asp:Label>

No comments :

Post a Comment