Every time I start to passively browse Microsoft's MSDN site, I can't help but come away with some emerging technology that I can't wait to get home and hammer at. Hmm, the fiancee's working, the dog is sleeping....let's do this. Tonight's episode: ASP.NET's Hands On Lab featuring Atlas.
"Atlas" is the codename for ASP.NET adding support for Asynchronous JavaScript and XML (AJAX). The beauty of AJAX is the ability for client-side browsers to call a web service asynchronously to render content to the page without requiring the page to re-post. This method has been used by large websites, but was cumbersome and required a lot of code to maintain. ASP.NET implements the Atlas template to allow a developer to have a simple AJAX enabled website up in less than 30 minutes. Here's an overview of how to pull this off:
(Note: installing the Atlas template and creating a new website will open the lab's step-by-step instructions, so I won't rehash the details here)
The Basics:
Prerequisites: Beta 2 or an RTM installation of Microsoft Visual Studio 2005 and the .NET Framework version 2.0.
1) Install the ASP.NET Atlas template (download it here).
2) Create a new website, and select the Atlas Template

3) Add a New Item to the project, and select "Master Page".

4) The Master Page holds the core setup of the AJAX process, setting the required scripts and formatting child pages. This form is not required for AJAX, but for simplicity the lab recommends using it. You'll modify the DocType of this form, and the asp:contentplaceholder control to allow for dynamic content. Notice the scripts being set to handle different browsers. These scripts play an important role in this project, as they allow the client browser to contact the web service. Modify the source to look like Microsoft's example:

5) Now you need a web service to handle requests and generate content for the client browser. Add a new web service to the project.

6) Modify the source as follows; the web service has one WebMethod that accepts input and retuns a value. This method is the same as any other .NET web service, and can access local services, databases, file stores, or other assemblies.

7) Right-click on your Master Page, and select "Add Content Page" to create a child form. This form will contain your form and AJAX content. You'll add a method to submit the user's query to the web service, and a callback method the web service will use to notify the form that a response is ready. This is an asynchronous call, remember, so the callback is necessary to alert the form its time to go.

8) You're all set! Save and build your project, then right click on the content form in Solution Explorer, and select 'View in Browser'. You'll see your initial form, and entering text and submitting the form results in new content rendering to the page, without having to repost itself.

Like I said, Microsoft's lab does a good job of explaining why you are adding specific code to the forms. Give this lab a half hour, and you'll be amazed how easy AJAX implentation is using Visual Studio.NET 2005!