Tab
A newer version of this page is available. Switch to the current version.

ASPxPageControl Class

Represents a navigation control made up of multiple tabbed pages.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

public class ASPxPageControl :
    ASPxTabControlBase,
    ICallbackEventHandler,
    IEndInitAccessorContainer
Public Class ASPxPageControl
    Inherits ASPxTabControlBase
    Implements ICallbackEventHandler,
               IEndInitAccessorContainer

Related API Members

The following members accept/return ASPxPageControl objects:

Library Related API Members
ASP.NET Controls and MVC Extensions TabbedLayoutGroup.PageControl
ASP.NET Bootstrap Controls BootstrapCardViewTabbedLayoutGroup.PageControl
BootstrapGridViewTabbedLayoutGroup.PageControl
BootstrapTabbedLayoutGroup.PageControl
eXpressApp Framework RenderHelper.CreateASPxPageControl()

Remarks

Use the ASPxPageControl to display a set of tabbed pages which allow their contents to be explicitly specified. This provides a web application with the functionality of tab-based navigation between several specific containers of child controls. The ASPxPageControl control supports the following common features:

  • Programmatic access to the page control model to dynamically create tab pages, set properties, respond to the changes of the active tab and so on.
  • Programmatic access to the page control's client-side object model to perform specific client actions with tabbed pages.
  • An ability to perform round-trips to the server using AJAX-based callback technology.
  • Customizable appearance through themes, user-defined images, styles, and user-defined templates.

The ASPxPageControl holds its tabbed pages in the ASPxPageControl.TabPages collection. Pages are represented by the TabPage class instances. Each page's tab is capable of displaying any text specified by its TabBase.Text property, a tab image which can be defined via the ASPxTabControlBase.TabImage or a TabBase.TabImage property and a tooltip text set via the TabBase.ToolTip property. Tabs respond to end user clicks by activating their corresponding pages and displaying the content of each tabbed page.

The visibility and the visual order of page tabs within the page control can be controlled by the TabBase.Visible and TabBase.VisibleIndex properties of page objects.

The content of each tabbed page can be defined by using the server-side ContentControlCollectionItem.Controls property or client-side ASPxClientPageControl.SetTabContentHTML method.

The ASPxPageControl offers you complete customization of styles for page tabs and page client regions (for instance, see the ASPxTabControlBase.TabStyle, ASPxTabControlBase.ActiveTabStyle and ASPxTabControlBase.ContentStyle properties). Moreover, you can use the template technology to achieve unlimited control over the content of page tabs. You can specify the corresponding templates at the level of the page control (see the ASPxPageControl.TabTemplate and ASPxPageControl.ActiveTabTemplate properties) and at the level of individual page objects (see the TabPage.TabTemplate and TabPage.ActiveTabTemplate properties).

NOTE

The ASPxPageControl control provides you with comprehensive client-side functionality implemented using JavaScript code (see DevExpress.Web.Scripts to learn more):

The control's client-side API is enabled if the ASPxTabControlBase.EnableClientSideAPI property is set to true, the ASPxObjectContainer.ClientInstanceName property is defined, or any client event is handled.

Callbacks vs. Postbacks

Use the page control's ASPxTabControlBase.AutoPostBack property to control whether any end-user manipulation with the control's elements (page tabs) requires a round trip to the server side for further processing.

Round trips to the server can be performed in the following ways:

  • using standard postbacks (the whole page is refreshed)
  • using the AJAX-based callback technology.

You can define which way to use to perform round trips to server via the ASPxPageControl.EnableCallBacks property value.

Round trips to the server can be cancelled in a handler of the corresponding client-side event.

Usage Notes

If you want to use a navigation control which only provides tabbed interface but doesn't contain any pages with child controls, consider using the ASPxTabControl control.

See Also