TClientScript allows javascript code to be insert or linked to the page template. Prado is bundled with a large library of javascript functionality including effects, AJAX, basic event handlers, and many others. The bundled javascript libraries can be linked to the current page template using the UsingPradoScripts property. Multiple bundled javascript libraries can be specified using comma delimited string of the name of javascript library to include on the page. For following example will include the "ajax" and "effects" library.
The available bundled libraries included in Prado are
The dependencies for each library are automatically resolved. That is, specifying, say the "ajax", will also include the "prado" library.
Custom javascript files can be register using the ScriptUrl property. The following example includes the javascript file "test.js" to the page. In this case, the file "test.js" is relative the current template you are using. Since the property value is dynamic asset tag, the file "test.js" will be published automatically, that is, the file will be copied to the assets directory if necessary.
You can include javascript files from other servers by specifying the full URL string in the ScriptUrl property.
Any content within the TClientScript control tag will be considered as javascript code and will be rendered where it is declared.