Skip to main content
Tab

ASPxPageControl.TabPages Property

Gets the collection of tabbed pages within the current PageControl.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

public TabPageCollection TabPages { get; }

Property Value

Type Description
TabPageCollection

A TabPageCollection object representing the collection of tabbed pages.

Remarks

The TabPages property provides access to a collection that contains all tabbed pages of the current page control. This collection provides standard means to manipulate (add or remove) page objects within the page control. A particular tabbed page can be accessed using index notation.

Example

...
         <dxtc:ASPxPageControl ID="ASPxPageControl1" runat="server" 
         ActiveTabIndex="0" ClientInstanceName="pageControl">
             <TabPages>
                 <dxtc:TabPage Text="Tab 1">
                     <ContentCollection>
                         <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();
                tab.SetVisible(isVisible);
                }" />
                             </dxe:ASPxCheckBox>
                         </dxw:ContentControl>
                     </ContentCollection>
                 </dxtc:TabPage>
                 <dxtc:TabPage ClientVisible="False" Text="Tab 2">
                     <ContentCollection>
                         <dxw:ContentControl runat="server">
                             <dxe:ASPxLabel ID="ASPxLabel1" runat="server" Text="Label on Tab 2">
                             </dxe:ASPxLabel>
                         </dxw:ContentControl>
                     </ContentCollection>
                 </dxtc:TabPage>
             </TabPages>
         </dxtc:ASPxPageControl>
...
See Also