Saturday, January 23, 2010

Diffrenece Between Response.Redirect & Server.Transfer

Response.Redirect

  • It will update the user Url history.
  • Pass value using query string.
  • It is slow compared to Sever.Transfer.
  • It will be used to transfre to the external website.
  • Browser's history updated.
  • Url is changed.
  • It can be used for only aspx & html page.
  • This only get method to post variables from one page to another page. It means that
    we need to give in query string if we want to pass some variables to next page.


Server.Transfer

  • It wont update the user URL history.
  • We cant use querystring here.
  • It is faster than Response.Redirect.
  • It can be used only to transfer to other pages of the same web site.
  • The browser's history is not updated.
  • Url is not changed.
  • Only for aspx page.
  • Server.Transfer ("default.aspx","true") then it wil post all the variable using
    the post method.

No comments:

Post a Comment