ScriptReferenceEventArgs Class
Provides data for the ResolveScriptReference event.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
| Name | Description | |
|---|---|---|
![]() | ScriptReferenceEventArgs(ScriptReference^) | Initializes a new instance of the ScriptReferenceEventArgs class. |
| Name | Description | |
|---|---|---|
![]() | Script | Gets the ScriptReference object that contains the script library. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object^) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | MemberwiseClone() | |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
When a script reference is rendered, the ScriptReferenceEventArgs object contains the ScriptReference object that is defined in the ScriptManager instance. You can create an event handler for the ResolveScriptReference event to check the ScriptReference object and modify it as needed.
The following 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.
Available since 3.5
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


