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)

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

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.

See also

Reference

SPRibbon class

SPRibbon members

Microsoft.SharePoint.WebControls namespace