Share via


IndexOf Method

The IndexOf method of the SPWebPartCollection class returns the collection index of the specified Web Part.

Parameters

webPart   A Microsoft.SharePoint.WebPartPages.WebPart object representing the Web Part for which to return the index.

Return Value

A 32-bit integer that identifies the Web Part within the collection.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security