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
webPart
Type: Microsoft.SharePoint.WebPartPages.WebPartA Microsoft.SharePoint.WebPartPages.WebPart object that represents the Web Part for which to return the index.
Return Value
Type: System.Int32
A 32-bit integer that identifies the Web Part within the collection.