Skip to main content

TabPageCollection.IndexOf(TabPage) Method

Searches for the specified tab page object and returns the zero-based index of the first occurrence within the tab page collection.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.1.dll

NuGet Package: DevExpress.Web


public int IndexOf(
    TabPage tabPage


Name Type Description
tabPage TabPage

A TabPage object representing the tab page to locate in the collection.


Type Description

The zero-based index of the first occurrence of the specified tab page within the tab page collection, if found; otherwise, the negative one (-1).


The IndexOf method enables you to determine where a tab page specified by the tabPage parameter is located within the tab page collection represented by the current object. The collection of tab page objects can be accessed via the ASPxPageControl.TabPages property of a Page control.

This method searches the tab page collection for the specified tab page and, if found, returns the index value of the first occurrence. If no instance is found, the negative one (-1) is returned. The collection of tab pages is searched forward starting with the first element and ending with the last one.

See Also