Announcing the Microsoft AJAX CDN
page 5 of 7
by Scott Guthrie
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 33000/ 92

Using ASP.NET AJAX Preview 5 from the CDN

In addition to launching the AJAX CDN site, the ASP.NET team has also recently released ASP.NET AJAX Preview 5. You can download ASP.NET AJAX Preview 5 (with sample code) from CodePlex:

You can also now use the ASP.NET AJAX libraries simply by adding the following script tags that point at the CDN:

<script src="" 
<script src="" 

These script tags reference the beta version of the September 2009 release of the ASP.NET AJAX library (the /0909/ part of the URL represents the year and month that the version of ASP.NET AJAX was released). 

After you add script tags that reference the ASP.NET AJAX library, you can start using the library in your page. For example, the following code attaches a client DataView control that represents an array of photos to a DIV element in the body of the page.

The DIV element – with an id of "photos" – contains a template for formatting each photo in the array of photos. Here’s how the photos element is declared:

When the DataView is rendered, the contents of the photos DIV element is rendered for each photo in the array of photos. The following photos are displayed:

Because ASP.NET AJAX is a pure JavaScript library, the code above works perfectly well in an ASP.NET Web Forms, ASP.NET MVC, HTML, or even with classic Active Server Pages. The code also works with all modern browsers.

You can learn more about ASP.NET AJAX Preview 5 by downloading the sample code from the CodePlex project:

Below are several blog posts that delve into the features of ASP.NET AJAX Preview 5 in more depth:

Microsoft Ajax 4 Preview 5: The DataView Control -- Dave Reed explains how to take advantage of the new Dynamic Templates and Placeholders feature added to Preview 5.

ASP.NET Ajax Preview 5 and UpdatePanel – Jim Wang explains how you can use Preview 5 with existing websites that use the standard ASP.NET UpdatePanel control.

Building a class browser with Microsoft Ajax 4.0 Preview 5 – Bertrand Le Roy builds a very cool Ajax class browser application by taking advantage of several new features of Preview 5 including recursive templates.

How the DataContext can change your data and your life (well, sort of, but not really) – Jonathan Carter has a great series of posts that dive into the details of the Ajax DataView and DataContext.

View Entire Article

User Comments

Name: Sunil
Date: 2010-07-16 6:11:12 PM
Hi, i am not understanding what is meaning of cross page posting which i have read in Wrox 4, please help

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-05-22 7:34:16 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search