Represents a navigation control used to create tabbed interfaces.
public class ASPxTabControl : ASPxTabControlBase
Public Class ASPxTabControl Inherits ASPxTabControlBase
Use the ASPxTabControl to display a set of tabs within a web page thus providing a web application with the tab-based navigation functionality. This control can be used in combination with other web controls (for instance, with the standard MultiView control) for building tabbed interfaces on web pages. Note that unlike a page control (see the ASPxPageControl), the ASPxTabControl is not made up of several pages that contain different controls. Instead, the ASPxTabControl provides only navigation means and requires that a developer should update a specific content to reflect the change of the tab control’s selected tab. The ASPxTabControl control supports the following common features:
- Data binding that allows the information about the control’s tabs to be obtained from hierarchal data sources.
- Programmatic access to the tab control model to dynamically create tabs, set properties, respond to the changes of the active tab and so on.
- Programmatic access to the tab control’s client-side object model to perform specific client actions with tabs.
- Customizable appearance through themes, user-defined images, styles, and user-defined templates.
The ASPxTabControl holds its tabs in the ASPxTabControl.Tabs collection. Tabs are represented by the Tab class instances. Each tab is capable of displaying any text specified by its TabBase.Text property, tab image which can be defined via the ASPxTabControlBase.TabImage or TabBase.TabImage property and a tooltip text set via the TabBase.ToolTip property. The response of tabs to end user clicks can be specified in two ways. The first is to specify the Tab.NavigateUrl property of a tab. In this instance, the browser will navigate to the specified linked page when a tab is clicked (by default, a linked page is displayed in the same window or frame as the tab control; to display the linked content in a different window or frame, use the control’s ASPxTabControl.Target property). The other method is to handle the clicks on tabs via specific events in order to process them either on the server or client depending upon the tab control’s ASPxTabControlBase.AutoPostBack property setting.
The ASPxTabControl offers you complete customization of tabs, tab client regions and links styles (for instance, see the ASPxTabControlBase.TabStyle, ASPxTabControlBase.ActiveTabStyle, ASPxTabControlBase.ContentStyle and ASPxTabControl.LinkStyle properties). Moreover, you can use the template technology to get unlimited control over the contents of tabs. You can specify the corresponding templates at the level of the tab control (see the ASPxTabControl.TabTemplate and ASPxTabControl.ActiveTabTemplate properties) and at the level of individual tab objects (see the Tab.TabTemplate and Tab.ActiveTabTemplate properties).
- The control’s client-side equivalent is represented by the ASPxClientTabControl object.
- On the client side, the client object can be accessed directly by the name specified via the ASPxTabControlBase.ClientInstanceName property.
- The available client events can be accessed by using the ASPxTabControlBase.ClientSideEvents property.
The control’s client-side API is enabled if the ASPxTabControlBase.EnableClientSideAPI property is set to true, or the ASPxPanelBase.ClientInstanceName property is defined, or any client event is handled.
Use the tab control’s ASPxTabControlBase.AutoPostBack property to control whether any end-user manipulation with the control’s elements (tabs) requires posting back to the server side for further processing.
If you want to use a tabbed control with several pages that contain different controls, consider using the ASPxPageControl control.