Difference between server.transfer and response.redirect

1)  server.Transfer is used for redirecting the user from one page to another this is only for those applications which are running on the same server
where as
Response.Redirect is used for the applications which are running on different server.

2)  There is a round trip in Response.Redirect
where as
in the server.Transfer only the data is getting loaded in the same browser means there is no round trip in server.Transfer.

3)  Response.Redirect is used in .HTML and .ASPX pages
where as
server.tranfer is used in .ASPX pages only.

4)  In response.redirect URL is changed for the new page
where as
in server.transfer the URL remains same.

5) In Response.redirect by default page method is get method means if u want to transfer any data from one page to another then you will have to keep this in query string or session
where as
in server.transfer default method is post method means all the data from previous page get transferred to new page .

6) In server.transfer you will not able to save the history in browser
where as
in Response.redirect the browser history is saved and updated.

 

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

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

Google photo

You are commenting using your Google 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