System.Web.UI.ClientScriptManager.RegisterClientScriptInclude Method

Registers the client script include with the System.Web.UI.Page object using a type, a key, and a URL.

Syntax

public void RegisterClientScriptInclude (Type type, string key, string url)

Parameters

type
The type of the client script include to register.
key
The key of the client script include to register.
url
The URL of the client script include to register.

Remarks

This overload of the erload:System.Web.UI.ClientScriptManager.RegisterClientScriptInclude method takes key and url parameters to identify the script, as well as a type parameter to specify the identification of the client script include. You specify the type based on the object that will be accessing the resource. For instance, when using a Page instance to access the resource, you specify the Page type.

Note:

To resolve the client URL, use the Control.ResolveClientUrl(string) method. This method uses the context of the URL on which it is called to resolve the path.

This method adds a script block at the top of the rendered page.

Requirements

Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0