Getting Started
This section of the book depends on technology that is readily available from Microsoft. AJAX functionality is integrated into ASP.NET 3.5 and does not require any additional downloads. If, for some reason, you are not using ASP.NET 3.5, you can download the relevant parts from http://asp.net/ajax/downloads/.
Microsoft's announced intention is to split AJAX into three parts: a fully supported part; a Community Technology Preview that will have newly evolving parts; and the Control Toolkit, which will be an ever-expanding collection of samples and components, along with the tools you need to build your own custom AJAX controls.
ASP.NET and JavaScript
Microsoft's ASP.NET AJAX is a free framework for quickly creating the next generation of more efficient, more interactive, and highly personalized web experiences that work across most browsers.
To start, we'll look at an example that uses just client-side JavaScript to change the contents of a page, without the need to go back to a server.
Begin by creating a new ASP.NET Web Site named JavaScriptExample, as shown in Figure 5-1.
Figure 5-1. JavaScript example
Next, insert the following HTML and JavaScript at the top of the default.aspx page created for you by Visual Studio (or Visual Web Developer):
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD ...
Get Programming .NET 3.5 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.