Share via


SPWebPartCollection.Item property (Guid)

NOTE: This API is now obsolete.

Obsolete. Gets the Web Part object with the specified GUID from the collection. In C#, this property is an indexer for the SPWebPartCollection class.

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

Syntax

'Declaration
<ObsoleteAttribute("Use SPLimitedWebPartManager instead.")> _
Public ReadOnly Default Property Item ( _
    storageKey As Guid _
) As WebPart
    Get
'Usage
Dim instance As SPWebPartCollection
Dim storageKey As Guid
Dim value As WebPart

value = instance(storageKey)
[ObsoleteAttribute("Use SPLimitedWebPartManager instead.")]
public WebPart this[
    Guid storageKey
] { get; }

Parameters

  • storageKey
    Type: System.Guid

    A GUID that identifies the Web Part.

Property value

Type: Microsoft.SharePoint.WebPartPages.WebPart
A Microsoft.SharePoint.WebPartPages.WebPart object that represents the Web Part.

See also

Reference

SPWebPartCollection class

SPWebPartCollection members

Item overload

Microsoft.SharePoint namespace