Server.Transfer v/s Response.Redirect

Server.Transfer v/s Response.Redirect

Response.Redirect involves a roundtrip to the server whereas  Server.Transfer conserves server resources by avoiding the roundtrip.
It just changes the focus of the webserver to a different page and  transfers the page processing to a different page.

Response.Redirect can be used for both .aspx and html pages whereas  Server.Transfer can be used only for .aspx pages
and is specific to ASP and ASP.NET.
With Response.Redirect you can redirect the user to the both type of pages .html or .aspx like below,Response.Redirect(“mypage.html”) OR Response.Redirect(“OtherPage.aspx”) But in case of Server.Transfer you can only work with .asp or .aspx page like below
Server.Transfer(“mypage.asp”) OR Server.Transfer(“OtherPage.aspx”)

Response.Redirect can be used to redirect a user to an external websites.  Server.Transfer can be used only on sites running on the same server.
You cannot use Server.Transfer to redirect the user to a page running on a different server.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s