ToolPane.GetShowExtensibleToolPaneEvent Method

Returns a string of ECMAScript (such as JavaScript) which, if executed on the client, causes the extensible tool pane to open for the specified Web Part.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Shared Function GetShowExtensibleToolPaneEvent ( _
    uniqueID As String _
) As String
'Usage
Dim uniqueID As String
Dim returnValue As String

returnValue = ToolPane.GetShowExtensibleToolPaneEvent(uniqueID)
public static string GetShowExtensibleToolPaneEvent(
    string uniqueID
)

Parameters

  • uniqueID
    Type: System.String

    The unique identifier for the current Web Part.

Return Value

Type: System.String
A string of ECMAScript (such as JavaScript) which, if executed on the client, causes the extensible tool pane to open for the specified Web Part.

Remarks

In most cases, you need to pass in the Web Part ID surrounded by single quotation characters in the uniqueID argument, as shown in the code example below.

Examples

The following example demonstrates the use of the GetShowExtensibleToolPaneEvent method to provide the ECMAScript (such as JavaScript) code that is executed to open the tool pane when the user clicks a button in the custom Web Part.

    Protected Overrides Sub RenderWebPart(ByVal output As System.Web.UI.HtmlTextWriter)
        output.Write("Web Part with an extensible tool pane.<br><br>")
        output.Write("<input type=""button"" class=""ms-SPButton"" value=""Show Extensible ToolPane"" ")
        output.Write("onclick=""" & ToolPane.GetShowExtensibleToolPaneEvent("'" & Me.UniqueID & "'"))
        output.Write("""/><br><br>")
    End Sub
    protected void RenderToolPart(System.Web.UI.HtmlTextWriter output)
        {
        output.Write("Web Part with an extensible tool pane.<br><br>");
        output.Write("<input type=\"button\" class=\"ms-SPButton\" value=\"Show Extensible ToolPane\" ");
        output.Write("onclick=\"" & ToolPane.GetShowExtensibleToolPaneEvent(\'" & this.UniqueID & \'"));
        output.Write(\""/><br><br>");
}

See Also

Reference

ToolPane Class

ToolPane Members

Microsoft.SharePoint.WebPartPages Namespace