共用方式為


ScriptManager.RegisterNamedClientScriptResource 方法

定義

使用 ScriptManager 控制項註冊內嵌在組件中的用戶端指令碼 (根據資源名稱),以配合參與局部網頁呈現的控制項一起使用。

多載

RegisterNamedClientScriptResource(Control, String)

使用 ScriptManager 控制項註冊內嵌在組件中的用戶端指令碼 (根據資源名稱),以配合參與局部網頁呈現的控制項一起使用。

RegisterNamedClientScriptResource(Page, String)

使用 ScriptManager 控制項註冊內嵌在組件中的用戶端指令碼 (根據資源名稱),以配合參與局部網頁呈現的控制項一起使用。

RegisterNamedClientScriptResource(Control, String)

使用 ScriptManager 控制項註冊內嵌在組件中的用戶端指令碼 (根據資源名稱),以配合參與局部網頁呈現的控制項一起使用。

public:
 static void RegisterNamedClientScriptResource(System::Web::UI::Control ^ control, System::String ^ resourceName);
public static void RegisterNamedClientScriptResource (System.Web.UI.Control control, string resourceName);
static member RegisterNamedClientScriptResource : System.Web.UI.Control * string -> unit
Public Shared Sub RegisterNamedClientScriptResource (control As Control, resourceName As String)

參數

control
Control

要註冊指令碼的控制項。

resourceName
String

資源的識別項。

適用於

RegisterNamedClientScriptResource(Page, String)

使用 ScriptManager 控制項註冊內嵌在組件中的用戶端指令碼 (根據資源名稱),以配合參與局部網頁呈現的控制項一起使用。

public:
 static void RegisterNamedClientScriptResource(System::Web::UI::Page ^ page, System::String ^ resourceName);
public static void RegisterNamedClientScriptResource (System.Web.UI.Page page, string resourceName);
static member RegisterNamedClientScriptResource : System.Web.UI.Page * string -> unit
Public Shared Sub RegisterNamedClientScriptResource (page As Page, resourceName As String)

參數

page
Page

要註冊指令碼的頁面物件。

resourceName
String

資源的識別項。

適用於