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
Explain how can we inherit a static variable?
What is the appSettings Section in the web.config file?
What are the asp.net 2.0 features?
Is asp.net different from asp? If yes, explain how?
Explain how viewstate is being formed?
what are the events raised in asp.net page life cycle?in which stage view state can be loaded?
What is the base class from which web forms are inherited?
What is client side state management?
Explain the difference between array and linkedlist?
14. What are your Future Plans for Swatz Oils GROUP U.K?
Diff between web user control and web custom control?
Define repository pattern in mvc.net? : asp.net mvc
What is the adavantage of using ASP.NET routing?
What are session objects?
To add a hyperlink column to the DataGrid which tag is used ?