Friday, November 30, 2007

ASP.NET AJAX is Broken

I spent a couple of hours debugging this problem. I recently upgraded a web site to .net 3.5 and decided to make use of some of the ASP.Net AJAX controls. "It's so Easy!" they say. "Just drag and drop two controls and 'Welcome to Web 2.0!'" Not for me.

I was able to create use the UpdatePanel from a new site, but in my legacy site the page would do full page refreshes. I followed the example from MSDN's UpdatePanel Class Documentation. Comparing the html from my new site and my legacy site, I see my new site some additional JavaScript that initializes a PageRequestManager.

Now I know that it's not my code. Something must be configured wrong. So I compare the web.config in new site to the web.config in my legacy site. I identified the problem to be this line in my legacy site


Here's the kicker. I do a google search for - xhtmlConformance mode legacy asp.net ajax. Scott Guthrie's blog post from December of last year is at the top of the list. I read this post over a year ago, but failed to recall it when necessary.

After fixing the config problem I played with my new AJAXy site and had to grin. It was very little code to change for such a pleasant performance benefit.

0 comments:

About Me

Recent Posts

Interesting Posts

My Delicious Links