Lior Rozner Blog

The .NET era

HttpServerUtility.Transfer change in Framework 1.1

A week ago while I tried the new 1.1 framework on our web project, I have encounter a strange unexplainable behavior.
Thou I could not explain it exactly; it was definitely a change of behavior between the 1.0 and the 1.1 framework.

A few breakpoints and some call stacks after, I discovered that a call to HttpServerUtility.Transfer(string path) is translated in 1.0 to HttpServerUtility.Transfer(string path, bool perserveForm = false) and in 1.1 to HttpServerUtility.Transfer(string path, bool perserveForm = true).

With a little help of Anakrino(www.saurik.com) u can see the difference more easily

Framework 1.0
public void Transfer(string path)

{

      bool local0;

      Page local1;

 

      local0 = true;

      local1 = this._context.Handler as Page;

      if (local1 != null && local1.IsPostBack)

            local0 = false;

      this.Transfer(path, local0);

}
Framework 1.1

public void Transfer(string path)

{

      this.Transfer(path, true);

}

 

 

 

Comments

TrackBack said:

Server.Transfer changed it default value in 1.1 : Yosi Taguri's WebLog
# April 14, 2003 11:34 AM

mathieu cupryk said:

I am passing variables from a form aspx file to another form aspx file. Now when I want to click on the back button. How do I keep all my values on the first page of my form using the server.transfer second var=true. Please get back to me at macuprk@videotron.ca.
# August 21, 2003 7:19 AM

TrackBack said:

# February 22, 2004 7:36 AM

TrackBack said:

^_^,Pretty Good!
# April 9, 2005 10:19 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)