Sunday, June 8, 2008

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

Server.Transfer transfers execution from the first page to the second page on server side. Browser/Client made only one request and getting response. The benefit is, there is only one server side trip. The posted form variables and query string values also available on second page.

Response.Redirect tells the browser that the requested page can be found at a new specified location. Then browser initiates another request to the new page location and gets the contents. In this method there are two server side trips.

No comments: