SPLimitedWebPartCollection.Item Property (Guid)
Gets the first WebPart in the collection with the specified storage key.
Namespace: Microsoft.SharePoint.WebPartPages
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public ReadOnly Default Property Item ( _
storageKey As Guid _
) As WebPart
Get
'Usage
Dim instance As SPLimitedWebPartCollection
Dim storageKey As Guid
Dim value As WebPart
value = instance(storageKey)
public WebPart this[
Guid storageKey
] { get; }
Parameters
storageKey
Type: System.GuidA GUID representing the Web Part location in the collection.
Property Value
Type: System.Web.UI.WebControls.WebParts.WebPart
A Web Part object at the specified location.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | The collection does not contain a WebPart with the specified storageKey. |
See Also
Reference
SPLimitedWebPartCollection Class