You don’t need to install the Microsoft AJAX Library if you are using Visual Studio 2008. The JavaScript files that are part of the AJAX Library are already included without having to do anything special. This article looks at the JavaScript files included in ASP.NET AJAX Library versions 1.0 and 3.5 as well as the downloads for standalone version.

Table of Contents

Version 1.0 of ASP.NET AJAX Library

Figure 1. JavaScript Files in Version 1.x of ASP.NET AJAX Library

Version 3.5 of ASP.NET AJAX Library

The AJAX Library in the Global Assembly Cache

Figure 2. System.Web.Extensions dll in the Global Assembly Cache

System.Web.Extensions under .NET Reflector

Figure 3. System.Web.Extensions assembly under .NET Reflector

Figure 4. System.Web.Extensions assembly as a reference

Microsoft AJAX Library as a standalone library

Figure 5. Getting Microsoft Library as a standalone library

Version 1.0 of ASP.NET AJAX Library

For ASP.NET AJAX Library 1.0 (you would be using this with Visual Studio 2005 / ASP.NET 2.0), you would download an installer file (ASPAJAXExtSetup.msi) and that would install the necessary files and templates.

If you installed the AJAX Library for ASP.NET 2.0, you can see in the figure below that this is installed by default in C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions directory.

Figure 1. JavaScript Files in Version 1.x of ASP.NET AJAX Library

As you can see above, the library includes two important files: MicrosoftAjax.js and MicrosoftAjaxWebForms.js. It also includes a smaller file named MicrosoftAjaxTimer.js. All these files also have debug versions – MicrosoftAjax.debug.js, MicrosoftAjaxWebForms.debug.js, and MicrosoftTimer.debug.js.

Version 3.5 of ASP.NET AJAX Library

With Visual Studio 2008, there is no need to separately install the ASP.NET AJAX Library. It already comes pre-installed. The JavaScript files that are part of the library are now included as resources in System.Web.Extensions.dll file.

The AJAX Library in the Global Assembly Cache

Since System.Web.Extensions.dll is part of the .Net Framework, you would also find this file in the Global Assembly Cache (GAC) directory. The GAC directory is typically either C:\Windows\assembly or C:\winnt\assembly. You will find hundreds of other assemblies in this directory that belong to different versions.

Figure 2. System.Web.Extensions dll in the Global Assembly Cache

As you can see from the figure above, there are two different versions of System.Web.Extensions.dll (one from 3.5.x and another from 1.0.x). In the figure you might notice that there are 725 dlls / assemblies in the GAC directory.

System.Web.Extensions under .NET Reflector

If you look at the System.Web.Extensions assembly under a tool like .NET Reflector, you can clearly see that all the .js files that belong to the ASP.NET AJAX Library are included as Resources within the assembly. If you click on one of the JavaScript files (for example, MicrosoftAjax.debug.js), you can see the actual JavaScript code in the Disassembly window.

Figure 3. System.Web.Extensions assembly under .NET Reflector

During development time / run time, the JavaScript files from this assembly are extracted and sent to the client side so that the JavaScript / AJAX functionality you included in the application works.

If you look at a typical ASP.NET AJAX application, you will see that System.Web.Extensions is included under the References section. As you can see in the figure below, a basic AJAX Server Control project includes a Reference to the System.Web.Extensions assembly.

Figure 4. System.Web.Extensions assembly as a reference

Microsoft AJAX Library as a standalone library

To summarize the above two sections, you can install version 1.0 of the AJAX Library from ASP.NET 2.0 (or Visual Studio 2005) by downloading it from the asp.net web site.

Then version 3.5 of AJAX Library is included in System.Web.Extensions assembly, which ships with .Net / ASP.NET 3.5 (which is used in Visual Studio 2008).

And finally, as shown in the figure below, you can also get version 3.5 of the Microsoft AJAX Library for its use with NON-ASP.NET web sites. When downloaded, you can see that this library is a collection of the same three JavaScript files (MicrosoftAjax.js, MicrosoftAjaxWebForms.js, and MicrosoftAjaxTimer.js) that you see in the System.Web.Extensions assembly.

Figure 5. Getting Microsoft Library as a standalone library

Take a Quick Quiz on this Article

1. Which of the following JavaScript files does NOT belong to the ASP.NET AJAX Library?

You don’t need to install the Microsoft AJAX Library if you are using Visual Studio 2008. The JavaScript files that are part of the AJAX Library are already included without having to do anything special. This article looks at the JavaScript files included in ASP.NET AJAX Library versions 1.0 and 3.5 as well as the downloads for standalone version.

A big chunk of the MS AJAX client side functionality is in the MicrosoftAjax.js source file. Understanding what’s in this file means understanding the primary concepts of MS AJAX. This article looks at the JavaScript source code available in the MicrosoftAjax.js file.