What is the difference between Server.Transfer and
Response.Redirect? Why would I choose one over the other?

Answer Posted / vaibhav nagar

Response.Redirect sends message to the browser saying it to
move to some
different page, while server.transfer does not send any
message to the browser
but rather redirects the user directly from the server
itself. So in server.transfer
there is no round trip while response.redirect has a round
trip and hence puts
a load on server.
Using Server.Transfer you can not redirect to a different
from the server itself.
Example if your server is www.yahoo.com you can not use
server.transfer to move
to www.microsoft.com but yes you can move to
www.yahoo.com/travels, i.e.
within websites. This cross server redirect is possible
only using
Response.redirect.
With server.transfer you can preserve your information. It
has a parameter
called as “preserveForm”. So the existing query string etc.
will be able in the
calling page.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What websites use asp.net?

524


Where the assembly is stored in asp.net?

552


Mention the execution process for managed code?

537


Explain the difference between dataset and datareader.

531


What are validators and list some validators of asp.net?

542






What is a 404 redirect?

562


Explain the difference between overriding and overloading?

544


How you can return View from ASP.NET Web API method?

548


Can we have multiple master pages in asp net?

511


What is the procedure to handle the process request using mhpm events fired? : asp.net mvc

539


What are the various types of cookies in asp.net?

546


What is http post action?

540


What is server redirect?

547


What is state management technique?

543


Whta are the Various steps taken to optimize a web based application (caching, stored procedure etc.) ?

552