SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 146 | Next

Robin Pars, Laurence Moroney, and John Grieb

"Foundations of ASP.NET AJAX"

The ScriptReference object has the capability to use
scripts that are either stored as embedded resources in an assembly or as files on the web
server.
To register an embedded script, you must first set the Name property of the
ScriptReference tag to the name of the actual file that contains the script and then
set the Assembly property to the name of the assembly containing the script. You can
see an example of this in the following script snippet:





More simply, to use a file-based script that resides on the web server, you can set the
Path property of the ScriptReference tag to the location of the file as shown here:





When you run the page containing the preceding script and view the source of the
browser output, you??™ll notice that a new script code block has been added: