A ScriptManager is required on every page that you want to use the Microsoft AJAX Library. When the ScriptManager is included in the page, the Microsoft AJAX Library scripts are rendered to the browser. This enables support for using the ASP.NET AJAX Client Library, and by default enables support for partial page rendering. Listing 5-1 (Bare.aspx) is a page with a barebones ScriptManager that does nothing more than render the Microsoft AJAX Library files to the browser.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>ASP.NET AJAX ScriptManager</title> </head>
<body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <div> </div> </form> </body> </html>
Upon running this page and viewing the rendered HTML source, notice how the rendering changes when the ScriptManager is added to the page. You get five new script elements in the HTML sent to the browser.