What is difference between Response.Redirect and Server.Transfer?

When I went for interview, they ask me this question. I don’t know this question and concept is not clear. Please tell me the difference.

Amazingly enough MSDN has the answer

In Server.Transfer client is shown as it is on the requesting page only, but the all the content is of the requested page. which is one of the best way to transfer data from one page to another keeping the page state alive. Like


Response.Redirect client know the physical location.If you want to pass state from the source page to the new page Like


I’ll note that Server.Transfer() is really a holdover from bad mojo of asp.ancient days . . .

server.transfer transfer control one page to other on server it doesn’t go back to client machine thats why url dont change

where in response.redirect it goes to client machine and then change control to other page hence url also change


Server.Transfer() helps the one less round trip. The main advantage of this transfer the first page to second page with better performance. The data can pass through variables, query string and also can retrive from the previous page control value.

Response.Redirect: It is very similar to server.Transfer. The main difference is the posted pervious page values can’t be accessable. Here also the data can pass through server variables and query string. It simply redirect the page from one page to another.

Redirect: A redirect is just a suggestion – it’s like saying to the client “Hey, you might want to look at this”. All you tell the client is the new URL to look at, and if they comply, they do a second request for the new URL.

Server Transfer: A transfer happens without the client knowing – it’s the equivalent of a client requesting one page, but being given another. As far as the client knows, they are still visiting the original URL.

Server.Transfer use only within the server.But Response.Redirect can be use ouside the server.But it should be a full path.