Difference between Response.Redirect() and Server.Transfer() in ASP.Net
What is main Difference between Response.Redirect() and Server.Transfer() method in ASP.Net C#.
The Both Method used to redirect user to new page in ASP.Net.
Response and Server both are the object of ASP.Net Technology.
If we want to go from one web form to other web from in asp.net we can use both Response.Redirect and Server.Transfer.
We can use response.redirect to send user to same server or another server.
If we use Response.Redirect method we can finish the whole Round trip and then after send user to another page.
we can use Session() object with Response.Redirect in ASP.Net
We can not use Context object with Response.Redirect because context object value will be black while page goes to server.
Resonse.redirect can be used both for aspx and html pages.
In Response.Redirect the browser’s history is updated.
we can use Server.Transfer to send user to same server web form, we can not send user to other server.
we can use Context with Server.Transfer to send value from one form to another form.
server.transfer is only used for aspx pages it will not work for html pages.
In Server.Transfer the browser’s history is not updated.