By default, each of the RadControls for ASP.NET AJAX serves a set of files (JS code) needed for its proper client-side operation.

When loading a page with several controls on it, the number of these files can become very large, often resulting in a reduced page load time and increased traffic. The reason for this problem is that browsers make a separate request to the server for each of these resources.

Usually this problem is overcome by disabling the automatic script serving of the controls, combining them into a smaller set of files and registering the links to these files manually on the page.

This approach is not the best for of a number of reasons:

You must extract the files from the assembly for each control release.

Files become too large to be maintainable (or you have to write a script to merge the source files).

The number of merged files you need to maintain can become very large depending on the control sets you have on different pages.

With the RadScriptManager control, the RadControls for ASP.NET AJAX suite gives developers the advantage of a simple drag-and-drop to combine resources into a single request. All you need is to add a RadScriptManager to your page and the JavaScript files get combined into a single file.

note

The performance gain of RadScriptManager should be monitored on a remote server, but not in a local development. This is, because the control optimizes the network latency delay when loading the scripts. This comes at the cost of some processor load, because the scripts get combined and compressed on the server.
When testing locally, the largest part of the result you get is the time RadScriptManager takes to combine the scripts and serve them to the browser.
Note that the RadScriptManager does NOT combine the web resources needed for the Telerik controls in a single request when the CDN is enabled.

RadScriptManager needs an HttpHandler to be declared in the application configuration file to operate properly. The addition of the handler is made easier by the SmartTags of the control.

The RadScriptManager control replaces the ScriptManager available in the Microsoft Ajax Extensions suite.

When put on the page, the RadScriptManager combines all requests (to the "JavaScript assembly resource files" on the page) into a single one, thus reducing the time of the page load and the consumed traffic.

RadScriptManager does this by outputting a tag with a specific URL, making a request to an HttpHandler, which then serves the combined scripts.

If the script combination is not needed for some reason (e.g. debugging) it can be disabled by giving the EnableScriptCombine property the value of False.

You can change Handler by using the HttpHandlerUrl property of the control.

When in integrated mode, IIS7 reads the application configuration from the section group in the application configuration file, but not the section group. Since Visual Studio 2005 does not provide "native" support for IIS7, the RadScriptManager registration cannot be automatically added to the system.webServer.

RadScriptManager does not support the automatic switch to debug-mode. For example, having an assembly including ScriptReferences in both Debug and Release ScriptMode, where the application is in a debug mode, RadScriptManager will output only the "Release" ones. If debugging is needed, the EnableScriptCombine property can be set to False.

RadScriptManager currently does not display IntelliSense information for the property and the ScriptReferences.

Give article feedback

Tell us how we can improve this article

Code samples are inaccurate/outdated.
I expected to find other/more information.
There are typos/broken links/broken page elements.
Content is inaccurate/outdated.
Other
By checking this box you consent to Progress contacting you by email about your response on this page.