Sunday May 1st

Friday April 29th

Thursday April 28th

Wednesday April 27th

ASP.NET - Server.Transfer v/s Response.Redirect

This article tell you the difference between Server.Transfer and Response.Redirect.


No guys, this is a terrible explanation, look for this topic on Phil Haack's blog (, THAT is an explanation.

I recommend avoiding Server.Transter( ) in nearly all situations. I've seen people save almost an entire form in context and then read the values back on the new page. This is a horrible idea because it ties the second page with the first page. I have no problem with one page complementing another page (e.g, passing search criteria in a query string to the next page), but if one page absolutely relies on the previous page (e.g, saving the value of every control into Context and reading it back on the second page) you're better off just using panels that are hidden and displayed when appropriate.

On that note, one good use that I have found for a Server.Transfer() is when transferring to a summary page after, for example, a user has made a purchase. This prevents the user from hitting the back button and having their credit card charged twice. Other than that, saving a single additional request from the client, there isn't much else I have found to gain, but a lot more to loose.

In my not so humble opinion, it's almost never a good idea to break browser URL's. And no, URL rewriting is not the right answer --it's another hack that is very specific to the implementation. Also, I've run into situations where developers have used Server.Transfer() for every single request. This ends up breaking the browsers back button and frustrates users, which is also not a very smart thing. Lastly, every developer that I know that makes exclusive use of Server.Transfer() ends up making the mistake of saving [nearly] every control value into context before transferring and then reading the values back on the new page. Any time you update either page, you have to make sure you haven't broken anything. This is just silly and should definitely be considered bad practice.

Hi simoneb,
Why you thinks that its a terrible article,
I am not agree with you, its not because this is my article, but its caz its contains almost each and every aspect about this topic, the article you have given is also contains the same things, i have explained my article more clearly, so that a beginner can understand, your article is explained in more advanced way, or you can say that its explained so much in deep which most of the pepole not requires, a beginner or a developer who's not having much expertise abt can't understand such things. and most of the times we require good and understandable explanation, and in your article it is explained so much in deep, which only goiod for knowledge.:D
but its good to read that article after reading my article, caz moving from simplest to advanced is the way to move on....
take care.:d

:)nice article

Commenting on Stories is limited for now and will open up to those recommended by the community. Learn how
Loading DotNetKicks...
brought to you by the Kicks Network