ScriptReference::Name Property
Gets or sets the name of the embedded resource that contains the client script file.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
Property Value
Type: System::StringThe name of the client script file that is embedded as a resource in an assembly.
The following example shows how to reference a custom control and a JavaScript file that is embedded in the control assembly. The assembly is assumed to be in the Bin folder of the Web site. The custom control animates UpdatePanel controls. The JavaScript file is compiled as an embedded resource that is named SampleControl.UpdatePanelAnimation.js. You register the embedded JavaScript file by using the Assembly and Name properties.
To use this example, compile the JavaScript file that is shown in the example as an embedded resource with the custom control. Put the resulting assembly into the Bin folder of the Web site. For an example of how to embed a JavaScript file in an assembly, see Walkthrough: Embedding a JavaScript File as a Resource in an Assembly.
The following example shows a page that uses the custom control.
The following example shows the custom control class definition.
The following example shows the supporting JavaScript file.
The following example shows code that you must add to the AssemblyInfo file of the project that contains the custom control and the JavaScript file.
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.