7.2. The ASP.NET AJAX Controls

The number of controls and extenders available from the Control Toolkit is large. There are more than 35 controls and extenders at your disposal. This section will look at these new items and how to use them in your ASP.NET applications.

When you add an ASP.NET AJAX server control to your page, one thing you will notice is that a lot of DLLs are added to your solution in the language folders within the Bin folder. You will need to have the AjaxControlToolkit.dll with the language DLLs when you reference it. An example of what you will find is presented in Figure 7-7.

Figure 7-7. Figure 7-7

If you look at one of the DLLs with Lutz Roeder's .NET Reflector tool (www.red-gate.com/products/reflector), you will notice that it is focused on the client-side localization required by many applications. The AjaxControlToolkit.resources.dll for the Russian language within Reflector is shown in Figure 7-8.

Besides adding the localization DLLs to your project, the ASP.NET AJAX control is added the same way that any other custom server control would be in ASP.NET. Listing 7-1 shows what your ASP.NET page would look like after adding a single ASP.NET AJAX control to your page.

Example 7-1. Changes to the ASP.NET page after adding an ASP.NET AJAX control
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <%@ Register ...

Get Professional ASP.NET 3.5 AJAX now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.