Wednesday, June 3, 2015

  Response.Redirect should be used when:


   1: we want to redirect the request to some plain HTML pages on our server or to some other web      server

   2: we do not care about causing additional round-trips to the server on each request

   3: we do not need to preserve Query String and Form Variables from the original request

   4: we want our users to be able to see the new URL redirected where he is redirected in his browser (and be able to bookmark it if its necessary)

   Server.Transfer should be used when:


   1: we want to transfer current page request to another .aspx page on the same server

   2: we want to preserve server resources and avoid the unnecessary round-trips to the server

   3: we want to preserve Query String and Form Variables.

   4:we do not need to show the real URL where we redirected the request in the users Web Browser

No comments:

Post a Comment