Bug Vanquisher

11 September 2007

Weird, Weirdo or Weirder?

Filed under: Bugz, Debugging — Tanveer Badar @ 3:58 PM

It is up to you to classify the two abnormalities of ASP.Net that ships with netfx 2.

The first one had to do with web services only. I read it on Clemens Vasters blog accidentally. You can read the details there. I am not going to repeat them in this post.

It is the second one which is most cruel. Specifically, MaintainScrollPositionOnPostBack=”true” does not work with AJAX. It seems ScriptManager thinks of it belonging to her mother-in-law. It whines pretty badly.

Even when you are not using AJAX, you are not entirely out of the woods. It can bite you if the page does not have any HtmlForm after PageBuilder is finished with it. I mean, why even check the property to be true of false if there is no form to set that property in the first place.

In a recent application I was working on, we had pages with no form element in them. I set MaintainScrollPositionOnPostBack=”true” in <pages/> section of root web.config and mysteriously those pages could not be rendered.

Now that ASP.Net has an additional ListView control for client side interaction, you will not be able to set MaintainScrollPositionOnPostBack=”true” in any page that uses it because it is built on AJAX.

A similar minor problem happens when you set <deployment retail=”true”/> in machine.config. ASP.Net stops generating details when exceptions are thrown by web applications. Try all you might with <customErrors mode=”off”/>, nothing will work. retail=”true” is the overriding factor here.


  1. so how can we do smart nav. ???

    Comment by mohammed — 28 January 2008 @ 10:18 AM

  2. I don’t know for sure because I never found out myself again in a similar situation.

    I think this “issue” has been fixed currently.

    Comment by Tanveer Badar — 28 January 2008 @ 11:00 AM

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: