Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
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, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.