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 is the difference between equals() and == in c#?

654


Explain different authentication modes in asp.net?

649


What do you understand by aggregate dependency?

703


Explain the various authentication mechanisms in asp.net.

575


Name the tools or API for developing or testing web api?

619






What is the server of asp.net?

597


How does output caching work in ASP.NET?

582


Why is it preferred to not use finalize for clean up?

637


What is route in web api?

621


How you will handle session when deploying application in more than a server?

691


What is bson in web api?

712


Is it right that ASP.NET Web API has replaced WCF?

598


What is difference between web api and web services?

623


What is difference between Server.Transfer and Response.Redirect in ASP.NET?

650


What is a 307 redirect?

574