Partilhar via


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)
Available in Sandboxed Solutions: No

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