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