Difference Between Response.Redirect And Server.Transfer

For More Videos Visit Our YouTube Channel


When Server.Transfer is used, the redirection is done by the Server itself. Hence there is not having any round trip when Server.Transfer is used.

Difference Between Response.Redirect And Server.Transfer, Response.Redirect Vs Server.Transfer, Server.Transfer, Response.Redirect, round trip in Response.Redirect, Url change in Response.Redirect, Asp.Net, MVC, c#

When Response.Redirect is used, the redirection is done by the client Browser. Hence there is having round trip when Response.Redirect is used.


Difference Between Response.Redirect And Server.Transfer, Response.Redirect Vs Server.Transfer, Server.Transfer, Response.Redirect, round trip in Response.Redirect, Url change in Response.Redirect, Asp.Net, MVC, c#



Server.Transfer can only be used to navigate to a page which resides inside the same server. Response.Redirect is used to navigate to a page which resides both inside and outside the server. For example, suppose our server has two pages. Test1.aspx and Test2.aspx From any of two, we can go to other page by using both Response.Redirect & Server.Transfer.

But we can go to a page outside the server like http://www.google.com only by using Response.Redirect. Means if you wants to redirect to different domain or server, Response.Redirect should be used.





Suppose we are navigating from Test1.aspx to Test2.aspx. If Server.Transfer is used, then after navigation, the URL will not change. That means after navigation, when Test2.aspx is fully loaded, the URL will be Test1.aspx But if Response.Redirect is used, the URL changes to the destination page. That means after navigation, when Test2.aspx is fully loaded, the URL will be Test2.aspx.