SPRibbonCommand Constructor (String, String)
Initializes a new instance of the SPRibbonCommand class that has the specified command identifier and the code to run when the command is invoked.
Namespace: Microsoft.SharePoint.WebControls
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Sub New ( _
commandId As String, _
handlerStatement As String _
)
'Usage
Dim commandId As String
Dim handlerStatement As String
Dim instance As New SPRibbonCommand(commandId, _
handlerStatement)
public SPRibbonCommand(
string commandId,
string handlerStatement
)
Parameters
commandId
Type: System.StringThe identifier of the command.
handlerStatement
Type: System.StringThe code to run when the command is invoked.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | commandId is a null reference (Nothing in Visual Basic). |