This clearly leads to wasted bandwidth for those pages that have the ScriptManager included (via the master page) yet don't use any features of the ASP.NET AJAX framework. One downside of adding the ScriptManager to the master page is that the above script is emitted in every page, regardless of whether its needed. If you plan on including AJAX functionality within the user interface of your master page, then you have no choice in the matter - you must include the ScriptManager in the master page. Step 1 walks through adding a ScriptManager to the master page. With this approach, you do not need to remember to add a ScriptManager to a new page that uses the ASP.NET AJAX framework because it is already included by the master page. Alternatively, you can add a ScriptManager to the master page, which then injects this necessary script into all content pages. And this is sufficient, but if you have many pages that use the framework you'll end up adding the ScriptManager control to all pages - a repetitive task, to say the least. Therefore, you might reason that it is ideal to only add a ScriptManager to those pages that use the ASP.NET AJAX framework. The external script references and inline script emitted by the ScriptManager are essential for a page that uses the ASP.NET AJAX framework, but is not needed for pages that do not use the framework. The other tags emitted by the ScriptManager include inline script that initializes this library.
The script provided by these three external JavaScript files constitute the ASP.NET AJAX framework's Client Library. Instead, when a request for either one of these files arrives at the web server, the ASP.NET engine examines the querystring and returns the appropriate JavaScript content. These files do not actually exist as files in your website. The ScriptManager emits three such tags one references the file WebResource.axd, while the other two reference the file ScriptResource.axd.
The tags instruct the browser to download and execute the JavaScript file at url.
The following markup shows the content that is added to the rendered output of a page that includes a ScriptManager control: It also adds a bit of inline JavaScript to the page that initializes this library. The ScriptManager control emits markup that instructs the browser to download the JavaScript files that makeup the ASP.NET AJAX Client Library. Examining the Markup Emitted by the ScriptManager Control For more information on using AJAX consult the ASP.NET AJAX videos and tutorials, as well as those resources listed in the Further Reading section at the end of this tutorial. This tutorial does not explore designing or building AJAX-enabled web applications with the ASP.NET AJAX framework.
It also looks at how to use the ScriptManagerProxy control to register custom scripts and script services in a specific content page. This tutorial shows how to add the ScriptManager control to the master page. If your site uses master pages (as it should), you do not necessarily need to add a ScriptManager control to every single content page rather, you can add a ScriptManager control to the master page. It can also be used to register custom JavaScript files, script-enabled web services, and custom application service functionality. At a minimum, the ScriptManager emits HTML that instructs the browser to download the JavaScript files that makeup the ASP.NET AJAX Client Library. As its name implies, the ScriptManager manages the client-side script used in AJAX-enabled web pages. When building AJAX-enabled web pages with the ASP.NET AJAX framework, you must add precisely one ScriptManager control to each and every page that uses the framework. ASP.NET AJAX is built into ASP.NET 3.5 and Visual Studio 2008 it is also available as a separate download for ASP.NET 2.0 applications. Creating AJAX-enabled ASP.NET applications is amazingly easy thanks to Microsoft's ASP.NET AJAX framework.
An AJAX-enabled website uses a number of related web technologies to offer a more responsive user experience. Over the past several years, more and more developers have been building AJAX-enabled web applications. Looks at using the ScriptManagerProxy class discusses how the various JS files are loaded depending on whether the ScriptManager is used in the Master page or Content page. Discusses options for using ASP.NET AJAX and master pages.