SPRibbonCommandHandler.SetGenericErrorMessage Method (String)
Inserts markup into the ECMAScript (JScript, JavaScript) of the page or in the callback function that called this handler that provides a unique error message.
Namespace: Microsoft.SharePoint.WebControls
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Sub SetGenericErrorMessage ( _
s As String _
)
'Usage
Dim instance As SPRibbonCommandHandler
Dim s As String
instance.SetGenericErrorMessage(s)
public void SetGenericErrorMessage(
string s
)
Parameters
s
Type: System.StringA string that contains the unique error message.
Remarks
This method is used to provide unique error messages for known exceptions. For example, someone clicks the Check Out button for a page that was previously checked out by someone else. This may occur if a page was not refreshed before another user tried to check out the same item. This would allow the Check Out button to be active, which would enable another user to attempt to check out the item. In this case, it is a known exception, and a unique error message provides specific information about the error. For example, a solution developer could provide information to the user about who has the item checked out.
See Also
Reference
SPRibbonCommandHandler Members