SPWebPartCollection.IndexOf method

NOTE: This API is now obsolete.

Obsolete. Returns the collection index of the specified Web Part.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
<ObsoleteAttribute("Use SPLimitedWebPartManager instead.")> _
Public Function IndexOf ( _
    webPart As WebPart _
) As Integer
'Usage
Dim instance As SPWebPartCollection
Dim webPart As WebPart
Dim returnValue As Integer

returnValue = instance.IndexOf(webPart)
[ObsoleteAttribute("Use SPLimitedWebPartManager instead.")]
public int IndexOf(
    WebPart webPart
)

Parameters

Return value

Type: System.Int32
A 32-bit integer that identifies the Web Part within the collection.

See also

Reference

SPWebPartCollection class

SPWebPartCollection members

Microsoft.SharePoint namespace