I had a problem on a piece of work today that was caused by ASP.NET loading a web page twice. The problem was caused by me caching some information read from a database. The initial page load had the old URL, including the QueryString, so my caching code was loading the last record rather than the current record. Luckily, I had property within my aspx page that looked at the QueryString. So, I could use that to check that the cached record was the correct one, and if not I could then refresh my cache.
There seem to many different reasons for a double page load, including having AutoEventWireup set to true, and “#” as the src for an image. But, my particular case wasn’t cured by the solutions for those. So, I ended up with the above work-around.