Share via


SPWebPartManager.GetStorageKey method

Returns the storage key for the specified Web Part on the page.

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

Syntax

'Declaration
Public Function GetStorageKey ( _
    webPart As WebPart _
) As Guid
'Usage
Dim instance As SPWebPartManager
Dim webPart As WebPart
Dim returnValue As Guid

returnValue = instance.GetStorageKey(webPart)
public Guid GetStorageKey(
    WebPart webPart
)

Parameters

Return value

Type: System.Guid
The storage key for this Web Part.

Exceptions

Exception Condition
ArgumentNullException

The Web Part is a null reference (Nothing in Visual Basic).

WebPartPageUserException

The Web Part is not on the page that contains this SPWebPartManager.

See also

Reference

SPWebPartManager class

SPWebPartManager members

Microsoft.SharePoint.WebPartPages namespace