Jan Schreuder on .Net

.Net code samples, experiences, observations

View my professional profile on LinkedIn

Recent Posts

Tags

News

  • Inappropriate comments will be deleted at my discretion.

    The information and code samples in this weblog is provided "AS IS" without warranty of any kind, either expressed or implied, including but not limited to the merchantability and/or fitness for a particular purpose.

Community

Email Notifications

Tool suppliers

Tools

General

Microsoft

Favorite blogs

Archives


TechEd - AJAX Patterns with ASP.NET AJAX

A very interesting session in which the presenters went beyond the Hype that Ajax has recently become.

In a number of demos, they quickly showed what (not) to do when implementing ASP.Net Ajax in your web application. An example:

If you have already seen ASP.Net Ajax, or Atlas as it was once called, you might have seen the UpdatePanel control. Now this panel allows you to quickly Ajax enable your application. Only the part of the form that is contained in the UpdatePanel will be updated after a post-back. But that doesn't mean your web page is not performing a post-back. In fact, it does a normal post-back and only once the server is past the rendering stage, it does some magic to only send stuff back that needs to be updated. To the user it looks like a quick change on the web page, but it's almost the same as a full post-back for the web application. So what can you do?

  1. Set AutoPostBack to false on all controls in the UpdatePanel that do not require an update to the web page.
  2. Set the UpdateMode property on the UpdatePanel to Conditional and add AsyncPostBackTrigger items to the TriggerElement for the UpdatePanel Control in the aspx page, or call the Update() method on the control when you need a post-back.
  3. And of course, think about what parts of the screen will require a post back.

Another option that was shown is calling a Web service to get information for a partial update. I won't go into details on this, that would be too much work. Keep an eye out for the TechEd sessions when they are made available and check out this session if you're interested in ASP.Net Ajax.

Leave a Comment

(required) 

(required) 

(optional)

(required) 


Please add 3 and 6 and type the answer here: