共用方式為


ToolPane.GetShowExtensibleToolPaneEvent method

傳回它,如果在用戶端,執行會使可延伸的工具窗格中開啟指定的 Web 組件 (例如 JavaScript) 採用的字串。

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Shared Function GetShowExtensibleToolPaneEvent ( _
    uniqueID As String _
) As String
'用途
Dim uniqueID As String
Dim returnValue As String

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

參數

  • uniqueID
    Type: System.String

    目前的 Web 組件唯一識別項。

傳回值

Type: System.String
(例如 JavaScript) 的如果執行在用戶端,將開啟指定的 Web 組件,可延伸的工具窗格會採用字串。

備註

在大多數情況下,您需要傳遞包圍起來的uniqueID引數中的單引號字元的 Web 組件識別碼,如下列程式碼範例所示。

Examples

下列範例會示範使用GetShowExtensibleToolPaneEvent方法,以提供 (例如 JavaScript) 採用執行程式碼,是當使用者按一下自訂的 Web 組件中的按鈕,開啟工具窗格。

    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>");
}

請參閱

參照

ToolPane class

ToolPane members

Microsoft.SharePoint.WebPartPages namespace