SPRibbon.GetWebPartPageComponentId Method
Retrieves an identifier that can represent a page component identifier for the WebPart on a WebPart page.
Namespace: Microsoft.SharePoint.WebControls
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Shared Function GetWebPartPageComponentId ( _
webPart As WebPart _
) As String
'Usage
Dim webPart As WebPart
Dim returnValue As String
returnValue = SPRibbon.GetWebPartPageComponentId(webPart)
public static string GetWebPartPageComponentId(
WebPart webPart
)
Parameters
webPart
Type: System.Web.UI.WebControls.WebParts.WebPartAn object that represents the WebPart.
Return Value
Type: System.String
The identifier of the page component.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The webPart parameter is a null reference (Nothing in Visual Basic). |
Remarks
The page component interacts with the web part selection model on the page and the ribbon.