ScriptManager.RegisterClientScriptInclude Method (Control, Type, String, String)
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
static member RegisterClientScriptInclude : control:Control * type:Type * key:string * url:string -> unit
The control that is registering the client script file.
The type of the client script file. This parameter is usually specified by using the typeof operator (C#) or the GetType operator (Visual Basic) to retrieve the type of the control that is registering the script.
A unique identifier for the script file.
The URL of the script file.
You use the UpdatePanel control that is being updated. To register a script file every time that an asynchronous postback occurs, use the RegisterClientScriptInclude(Page, Type, String, String) overload of this method.method to register a client script file for a page or part of a page that is participating in partial-page updates. Client script files that are registered by using this method are sent to the page only when the control represents a control that is inside an
If you want to register a script block that does not pertain to partial-page updates, and if you want to register the script block only one time during initial page rendering, use the RegisterClientScriptBlock method of the ClientScriptManager class. You can get a reference to the ClientScriptManager object from the ClientScript property of the page.
The ResolveClientUrl method. This method uses the context of the URL it is called for to resolve the path.method registers a client script file on the page by rendering a script element whose opening tag contains a src attribute. The url parameter is used to set the src attribute. To resolve URLs, use the
Both the RegisterClientScriptResource methods render script files to the browser. If a script with the same type and key (for a script file) or the same type and resource name (for an embedded resource) is already rendered, the script is not rendered again.and
Available since 3.5