Friday, 23 May 2014

Difference between Response.Redirect and Server.Transfer?

Response.Redirect
  • The page is redirected permanently.
  • Used to navigate within the same application as well as navigating from one application to another application.
  • The URL is changed because the processing of the second page is done on the second page, not on the first page from where we redirected.
  • We can bookmark the page because the full address is shown in a browser URL.
  • An extra round trip happens to the server.
  • It is used in HTML, ASP and ASP.Net pages to navigate from one page to another.
Server.Transfer
  • The Page is not redirected permanently.
  • Used to navigate within the same application, not outside of an application.
  • The URL is changed because the processing of the second page is done on the same page, without navigating on the second page.
  • We cannot bookmark the page because the full address is not shown in a browser URL.
  • An extra round trip does not happen to the server; because of this it saves server resources.
  • It is only used to navigate within an ASP or ASP.Net page, not within HTML pages.

No comments:

Post a Comment

How to improve applications performance which is hosted in cloud ?

Improving the performance of an application hosted in Microsoft Azure involves a combination of optimizing your application code, leveraging...