Registers client script with the ScriptManager control each time a postback occurs, and then adds a script file reference to the page.
Public Shared Sub RegisterClientScriptInclude ( _
page As Page, _
type As Type, _
key As String, _
url As String _
static void RegisterClientScriptInclude (
- page (Page)
The Page object that is registering the client script file.
- type (Type)
The type of the client script file. This parameter is usually specified by using the typeof (C# Reference) operator (C#) or the GetType Operator operator (Visual Basic) to retrieve the type of the control that is registering the script.
- key (String)
The string that uniquely identifies the script file.
- url (String)
The URL that points to the script file.
Registering a script file with this method causes the script to be rendered each time an asynchronous postback occurs. To register a script file for a control inside an UpdatePanel control so that script is registered only when the UpdatePanel control is updated, use the RegisterClientScriptInclude(Control, Type, String, String) overload of this method.
If you are registering a script file array that does not pertain to partial-page updates, and if you want to register a script file once during initial rendering, use the RegisterClientScriptInclude(String, String) method of the ClientScriptManager class. You can get a reference to the ClientScriptManager object from the ClientScript property of the page.
Assembly: System.Web.Extensions (Module: System.Web.Extensions)