SPLimitedWebPartCollection.Item property (String)

Gets the first WebPart in the collection with the specified identifier.

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

Syntax

'Declaration
Public ReadOnly Default Property Item ( _
    id As String _
) As WebPart
    Get
'Usage
Dim instance As SPLimitedWebPartCollection
Dim id As String
Dim value As WebPart

value = instance(id)
public WebPart this[
    string id
] { get; }

Parameters

  • id
    Type: System.String

    A string representing the Web Part location in the collection.

Property value

Type: System.Web.UI.WebControls.WebParts.WebPart
A Web Part object corresponding to the specified identifier, or a null reference (Nothing in Visual Basic) if the Web Part is not found.

See also

Reference

SPLimitedWebPartCollection class

SPLimitedWebPartCollection members

Item overload

Microsoft.SharePoint.WebPartPages namespace