System.Web.UI.WebControls.SubMenuStyleCollection.IndexOf Method

Determines the location of a specified System.Web.UI.WebControls.SubMenuStyle object in the System.Web.UI.WebControls.SubMenuStyleCollection collection.

Syntax

public int IndexOf (SubMenuStyle style)

Parameters

style
The System.Web.UI.WebControls.SubMenuStyle object to locate in the System.Web.UI.WebControls.SubMenuStyleCollection collection.

Returns

The index of the specified System.Web.UI.WebControls.SubMenuStyle object if it is found in the list; otherwise, -1.

Remarks

The System.Web.UI.StateManagedCollection.OnValidate(object) method is called to validate the style parameter before the index is returned.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0