mike mcintyre's

.N e t J o u r n a l

vbCity Blogs moved to:
http://cs.vbcity.com/blogs
  Home :: Syndication  :: Login

OctNovember 2009Dec
SMTWTFS
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

Archives

Topics

Source Code

VB Source Code: Hello World ASP.NET AJAX Beta 2 - Visual Basic 2005

C# Source Code: Hello World ASP.NET AJAX Beta 2 - C# 2.0

This is the second in a series of blog posts about Microsoft ASP.Net AJAX, a new web development technology from Microsoft.

The previous post in this series provided a definition of Ajax: A term used to refer to a group of technologies used, in various combinations, to create web applications that are more interactive and responsive, and which provide a richer client-side experience, than what is found in classic web applications.

What is Microsoft's ASP.NET AJAX?

Web applications built with Ajax technologies can be referred to as Ajax-style applications.

ASP.NET AJAX is a development framework for developing Ajax-style applications.  Its main purpose is to simplify the development of Ajax-style applications. Until now, creating Ajax-style applications has been fairly complicated and time consuming. ASP.NET AJAX simplifies the development of Ajax-style applications through features such as:

ASP.NET server controls that emit client-side JavaScript to reduce or eliminate the JavaScript you must write when you create an Ajax-style application;

An asynchronous communication layer that abstracts away the complexity of adding asynchronous postbacks and partial page rendering to an Ajax-style application;

Beneficial integration between the client-side Microsoft AJAX JavaScript libraries and the ASP.NET 2.0 server-based development framework for example, by providing client-side integration with server-side ASP.NET 2.0 authentication and profiles services and ASP.NET 2.0 web services created by developers.

Browser independence: what you create with ASP.NET AJAX will work across all the major browsers without modification;

Client-side APIs and components to support rich UI features - such as drag-and-drop and auto-completion - to save you from having to write the extensive code normally required for such rich UI features in Ajax-style applications.

Add ASP.NET AJAX Functionality to a Web Page

To add AJAX functionality to an ASP.NET Web page: (1) add an ASP.NET AJAX ScriptManager server control to the page; (2) identify individual sections of your page that you want to update; and (3) wrap each of the identified sections with an ASP.NET AJAX UpdatePanel server control.

The ASP.NET 2.0 ScriptManager control coordinates and tracks ASP.NET AJAX activity for an ASP.NET web page.  To enable ASP.NET AJAX activity on an ASP.NET page you must add a ScriptManager control to the page.  Note:  If you place a ScriptManager on a master page it coordinates and tracks ASP.NET AJAX activity for the children of that master page. You can not add a ScriptManager to a child of a master page that already contains a ScriptManager control.

The ASP.NET 2.0 UpdatePanel control enables sections of a page to be partially rendered without a postback. You identify sections of the page you wish to participate in partial rendering and 'wrap' each such section with an UpdatePanel control. Note: The ScriptManager control keeps track of all the update panels on the page. It coordinates the partial-page rendering behavior on the server and instructs the page what sections of the page to render as a result of the last asynchronous postback.

Hello ASP.NET AJAX

The source code included with this post (see download links above) is a very simple 'Hello World' program created with ASP.NET AJAX. It demonstrates how to implement partial page rendering with the ASP.NET 2.0 ScriptManager and UpdatePanel controls. Additional comments about these controls is included in the example page and source code.

The source code was created with ASP.NET AJAX 1.0 Beta 2 which is available at -> The Official Microsoft ASP.Net AJAX Website

The next post in this series will delve more deeply into partial page rendering.

For more information and FREE Microsoft ASP.NET Ajax installers visit -> The Official Microsoft ASP.Net AJAX Website

mike mcintyre    http://www.getdotnetcode.com

posted on Friday, November 10, 2006 9:01 AM