punjabtechnicaluniversity.blogspot.in
Following are the major differences between them:-
Following are the major differences between them:-
1.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.
2.Using Server.Transfer you can not redirect to a different from the server itself. Example If your server is www.yahoo.com you can 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.
3.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. In response.redirect you can maintain the state. You can but has lot of drawbacks. If you are navigating with in the same website use “Server.transfer” or else go for “response.redirect()”
0 comments:
Post a Comment
North India Campus