Skip to main content

PageControlTemplateContainer.TabPage Property

Gets a page object for which the template’s content is being instantiated.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.1.dll

NuGet Package: DevExpress.Web


public TabPage TabPage { get; }

Property Value

Type Description

A TabPage object representing the tabbed page whose tab is being rendered.


Use the TabPage property to obtain the tabbed page object for which the template’s content is currently being rendered. You can use properties of the returned TabPage object to obtain certain values needed to bind the properties of the controls composing your template.


The complete sample project is available in the DevExpress Code Central database at E483.

         <dxtc:ASPxPageControl ID="ASPxPageControl1" runat="server" 
         ActiveTabIndex="0" ClientInstanceName="pageControl">
                 <dxtc:TabPage Text="Tab 1">
                         <dxw:ContentControl runat="server">
                          <dxe:ASPxCheckBox ID="ASPxCheckBox1" runat="server" Text="Show Tab 2">
                                 <ClientSideEvents CheckedChanged="function(s, e) {
                var tab = pageControl.GetTab(1);
                var isVisible = s.GetChecked();
                }" />
                 <dxtc:TabPage ClientVisible="False" Text="Tab 2">
                         <dxw:ContentControl runat="server">
                             <dxe:ASPxLabel ID="ASPxLabel1" runat="server" Text="Label on Tab 2">
See Also