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
What is a nested masterpage in asp.net 2.0? Can there be a master page inside a masterpage?
How you can add an event handler?
What is a form tag?
What is break mode?
Who can consume WebAPI?
If 200 is for all successful operation then why do we have 201 response codes?
Why do we use datasource in asp.net?
If iam developing an application that must accomodate multiple security levels though secure login and my asp.net web appplication is spanned across three web-servers (using round-robbin load balancing) what would be the best approach to maintain login-in state for the users?
Do gac'ed assemblies have fulltrust?
What is the difference between a candidate key and primary key?
What is HTTPModule and HTTPcontext? What is the use of each?
is there any third party tools are using in .net technologies? what are there ? give me the brief introduction?
In order to get assembly info which namespace we should import?
How to display Alert in ASP.NET
How can u debug your .net application?