System.Web.UI.ControlCollection.IndexOf Method

Retrieves the index of a specified System.Web.UI.Control object in the collection.

Syntax

public virtual int IndexOf (Control c)

Parameters

c
a System.Web.UI.Control

Returns

The index of the specified server control. If the server control is not currently a member of the collection, it returns -1.

Remarks

Use this method to determine the index location of the specified server control in the System.Web.UI.ControlCollection object.

Requirements

Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0