Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
Thetype exposes the following members.
|Assembly||Gets or sets the name of the assembly that contains the client script file as an embedded resource.|
|IgnoreScriptPath||Obsolete. Gets or sets a value that indicates whether the ScriptPath property is included in the URL when you register a client script file from a resource.|
|Name||Gets or sets the name of the embedded resource that contains the client script file.|
|Path||Gets or sets the path of the referenced client script file, relative to the Web page. (Inherited from ScriptReferenceBase.)|
|ResourceUICultures||Gets or sets a comma-delimited list of UI cultures that are supported by the Path property. (Inherited from ScriptReferenceBase.)|
|ScriptMode||Gets or sets the version of the client script file (release or debug) to use. (Inherited from ScriptReferenceBase.)|
|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 a hash function for a particular type. (Inherited from Object.)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|GetUrl||Infrastructure. Retrieves the URL that is rendered as the value of the src attribute of the script element. (Overrides ScriptReferenceBase::GetUrl(ScriptManager, Boolean).)|
|IsAjaxFrameworkScript||Determines whether the script reference is an AJAX script. (Overrides ScriptReferenceBase::IsAjaxFrameworkScript(ScriptManager).)|
|IsFromSystemWebExtensions||Infrastructure. Obsolete. Indicates whether the composite script contains a reference to an ASP.NET AJAX framework script. (Overrides ScriptReferenceBase::IsFromSystemWebExtensions().)|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|ToString||Returns a string that represents the value of the Name property, the Path property, or the type name. (Overrides Object::ToString().)|
To register a static script file, set the Path property of the object to the relative location of the file.
To register a script file that is embedded as a resource in an assembly, set the Assembly property to the name of the assembly that contains the file. Then set the Name property to the name of the .js file that is embedded in the assembly. In that case, the script file must be embedded, not linked.
You set the ScriptMode property to indicate whether to use the debug or release version of the script.
The Auto value produces different results depending on whether it refers to a standalone script file or to a script file that is embedded as a resource in an assembly. A standalone script file is defined with the Path property. An assembly reference must be accessed through the Name and Assembly properties. The results for the Auto value are as follows:
When it is applied to a script reference in an assembly, Auto is equivalent to Inherit. When only Name is specified, it is used to reference the script. When Name and the Path property are both specified, the Path property is used instead of Name, but the Auto value is still equivalent to Inherit.
The following example shows a page that uses the custom control.
The following example shows the custom control class definition.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.