Getting started with ASP.NET AJAX development, Part 2

In this tip we revisit ASP.NET AJAX development and present resources for getting the most out of server-side programming, the UpdatePanel and add-in controls.

This Content Component encountered an error

Back in August 2006, SearchVB.com published  Learning .NET: Get started with ASP.NET AJAX development, a roundup of tutorials, tips and best practices for using the technology. Quite a bit has changed since then -- Atlas is now called ASP.NET AJAX and, more importantly, is available as a release candidate. With that in mind, we decided to revisit the topic and provide a new list of resources. As always, if there are any additional resources...

that you have found helpful, drop us a line and we will add them to the list.

General tips

At press time Atlas is available as a release candidate and available as a free download at The Official ASP.NET AJAX Site. Scott Guthrie, head of Microsoft's ASP.NET development group, talks about changes to the framework between Beta 2 and Release Candidate 1 in the blog entry ASP.NET AJAX 1.0 Release Candidate Now Available. For developers already hard at work with the framework, Microsoft has published a migration guide for converting apps from ASP.NET AJAX Beta 2 to RC 1.

Those industrious developers may have noticed a somewhat frustrating lack of functionality in ASP.NET AJAX -- the loss of IntelliSense, which provides for tag completion and other hard-coding time savers. "Unfortunately we discovered a bug with the VS markup IntelliSense engine when doing the ASP.NET AJAX Beta1 release," Guthrie writes in Gotcha: Lost HTML IntelliSense within ASP.NET AJAX Controls. "[Y]ou lose IntelliSense when you map multiple assemblies against the tag prefix and use the controls within a control in a .aspx page based on a master page."

This glitch is fixed in Visual Studio 2005 Service Pack 1, available for download at the VS 2005 SP1 developer center. For those not using the service pack, there are two workarounds, Guthrie said -- keeping your master file open or change the tag-prefix naming for the ASP.NET AJAX controls.

UpdatePanel Tips

The UpdatePanel class enables the partial rendering of part of a Web application without a call back to the server; it is arguably the backbone to Ajax development. One drawback to UpdatePanel, though, is that it essentially breaks the browser's Back button and its history of previously visited URLs.

To remedy this, Nikhil Kothari, also a member of the ASP.NET development team, has developed a server control that implements the Back button and bookmarking functionality in pages that use UpdatePanel. More information is available in Kothari's blog entry, Back Button Support for Atlas UpdatePanels.

Find more information and resources about ASP .NET AJAX

On ASP.NET AJAX testing and debugging tools

ASP.NET AJAX mini-guide

Book excerpt: Secure ASP.NET AJAX development

ASP.NET AJAX components: Vendor roundtable -- Part 1

Another consideration when working with the UpdatePanel class is how it sends control messages to and from the server. In older versions of ASP.NET AJAX, the class used XML; now, said Dan Wahlin, an ASP.NET and XML Web Services MVP, "it uses a pipe-delimited approach to the response message." Learn more in Wahlin's blog entry, ASP.NET AJAX UpdatePanel Messages.

On top of that, developers must consider what happens when a call back does not work. As with control messages, this feature has changed as ASP.NET AJAX has evolved. In a blog entry called UpdatePanel: having fun with errors, C# MVP Luis Abreu demonstrates how to create error messages useful to both developers and end users.

ASP.NET AJAX Controls

If you are in the market for sample Ajax controls, then the ASP.NET AJAX Control Toolkit is a good place to start. The toolkit offers 28 free add-ins, ranging, alphabetically, from an according control to a validator callback.

Many developers have created their own controls. A few were mentioned in our previous Getting started with Atlas development tip. Others that have emerged since then include an ASP.NET AJAX RSS Reader, an Atlas TabStrip available here and here, and an Atlas Tab Strip with Asynchronous Callback.

Tutorials

One of the most comprehensive set of resources is our own ASP.NET AJAX Learning Guide, which links to a plethora of tips, tutorials and how-to videos. Other recently published resources include the following:

  • Simplify Task Progress with ASP.NET AJAX: This MSDN article by Dino Esposito covers the remote callback feature in Atlas and talks about how to add triggers, progress bard and an UpdatePanel to an ASP.NET AJAX application.
  • ASP.NET AJAX under the hood secrets: This Code Project article by Omar Al Zabir, the founder of PageFlakes, talks about the server call, batch requests, cache options and other back-end Atlas programming.
  • Client-Side Web Service Calls with AJAX Extensions: This MSDN article by Fritz Onion lives up to its title, offering details on using Ajax to call Web services and using JSON, or JavaScript Object Notation, for serialization. JSON, a subset of JavaScript better suited for consumption in a browser, is the default serializer in ASP.NET AJAX.
  • Microsoft Ajax Library Cheat Sheets: Milan Negoran has posted on his blog "cheat sheets" for working with the following JavaScript base type extensions: Array, Boolean, Date, Error, Number, Object and String.

Videos

Some folks are visual learners. Others learn best when they hear instructions. Video tutorials, then, offer the best of both worlds -- and there is no shortage of ASP.NET AJAX videos on the Web.

Guthrie links to several videos in the blog post Great New Atlas Videos Published (All Free). The list includes introductory videos for ASP.NET AJAX and its companion Control Toolkit and offers more in-depth discussions of several specific controls. Additional videos are available at The Official Microsoft ASP.NET 2.0 Site.

Finally, Wahlin has posted three videos on his blog. The most recent, Viewing Albums with WPF/E and ASP.NET AJAX, shows how to build an application in which users type in the name of a recording artist and browse through 3D search results. The other videos, Debugging ASP.NET AJAX Applications with VS.NET 2005 and Calling Web Services using ASP.NET AJAX and JavaScript, possess rather self-explanatory titles.
 

This was first published in January 2007

Dig deeper on ASP.NET and Ajax development

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

SearchSOA

TheServerSide

SearchCloudApplications

Close