ScriptReferenceEventArgs.Script Property

 

Gets the ScriptReference object that contains the script library.

Namespace:   System.Web.UI
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

member Script : ScriptReference with get

Property Value

Type: System.Web.UI.ScriptReference

A ScriptReference object that contains the client script referenced on the Web page.

The ScriptReference object in the Script property is added to the Scripts property when the ResolveScriptReference event is raised.

The following code example shows an ASP.NET Web page that references a script file that is named CustomScript.js. When the Web application is hosted on the www.contoso.com domain, the Path property is set to a value specific for that domain. An event handler for the ResolveScriptReference event checks the host URL and changes the value for the Path property if it is necessary. The ScriptReference object is retrieved through the Script property.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.5
Return to top
Show: