---
title: "Ajax Toolkit TabContainer Control in ASP.Net"  
description: "The TabContainer is an ASP.NET AJAX Control which creates a set of Tabs that can be used to organize page content. Each Tab Panel defines its Heade"  
author: "Pushpendra Singh"  
published: 2010-12-02  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/282/ajax-toolkit-tabcontainer-control-in-asp-dot-net  
category: "ajax"  
tags: ["ajax"]  
reading_time: 2 minutes  

---

# Ajax Toolkit TabContainer Control in ASP.Net

The TabContainer is an [ASP.NET](https://www.mindstick.com/articles/155/concept-of-asp-dot-net) AJAX [Control](https://yourviews.mindstick.com/view/83439/bipartisan-gun-control-bill-passed-in-us-after-decades) which creates a set of Tabs that can be used to organize page content.

Each Tab Panel defines its HeaderTemplate [as well as](https://www.mindstick.com/forum/156547/difference-between-max-width-and-width-as-well-as-max-height-and-height) a [**ContentTemplate that**](https://www.mindstick.com/Articles/1486/creating-and-using-dll-dynamic-link-library-in-c-sharp) defines its content.

### TabContainer Properties:

- **ActiveTabIndex** - The first tab to show
- **Height** - sets the height of the body of the tabs.
- **Width** - sets the width of the body of the tabs
- **ScrollBars** - Whether to display scrollbars in the body of the TabContainer
- **TabStripPlacement** - Whether to render the tabs on top of the [container](https://www.mindstick.com/forum/34127/extjs-how-to-set-border-for-the-container) or below (Top, Bottom)
- **Enabled** - Whether to display the Tab for the Tab Panel by default.
- **OnClientClick** - The name of a [javascript function](https://www.mindstick.com/forum/156513/asynchronous-javascript-function) to attach to the client-side [click event](https://www.mindstick.com/forum/424/how-to-call-form_paint-event-on-button-click-event) of the tab.
- **HeaderText** - The text to display in the Tab
- **HeaderTemplate** - A TemplateInstance.Single ITemplate to use to render the header
- **ContentTemplate** - A TemplateInstance.Single ITemplate to use to render the body

### Code:

```
 <%-- ScriptManager control manages client script for AJAX enabled ASP.NET pages.This enables partial-page rendering and Web-service calls.You have to used this if you want to use ajax control toolkit--%><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager><cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" Width="300px"> <%--Use TabPanel for language --%><cc1:TabPanel runat="server" HeaderText="Programming Language" ID="TabPanel1"><ContentTemplate>       <asp:RadioButtonList ID="RadioButtonList1" runat="server">                        <asp:ListItem>c#</asp:ListItem>                        <asp:ListItem>J#</asp:ListItem>                        <asp:ListItem>vb</asp:ListItem>       </asp:RadioButtonList>       <asp:Button ID="Button1" runat="server" Text="Save" /></ContentTemplate></cc1:TabPanel> <%--Use Second TabPanel for database --%>         <cc1:TabPanel runat="server" HeaderText="Database" ID="TabPanel2"><ContentTemplate>            <asp:RadioButtonList ID="RadioButtonList2" runat="server">                        <asp:ListItem>sql server</asp:ListItem>                        <asp:ListItem>My sql</asp:ListItem>                        <asp:ListItem>oracle</asp:ListItem>                 </asp:RadioButtonList>                 <asp:Button ID="Button2" runat="server" Text="Save" /></ContentTemplate></cc1:TabPanel></cc1:TabContainer>
```

**Run the [project](https://yourviews.mindstick.com/story/1788/things-to-ensure-your-construction-project-is-successful)**

![Ajax Toolkit TabContainer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/dc72e4af-0b12-4571-b55b-467602146815/images/76c9e8b3-254f-453d-a3b2-82738850deaf.png)

When you click [database](https://www.mindstick.com/articles/71/how-to-create-xml-file-of-database-in-c-sharp) tab then database page will open

![Ajax Toolkit TabContainer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/dc72e4af-0b12-4571-b55b-467602146815/images/9e173d83-e2d7-4b73-8c09-7ecdaa99ef9b.png)

---

Original Source: https://www.mindstick.com/articles/282/ajax-toolkit-tabcontainer-control-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
