다음을 통해 공유


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

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