Wednesday, April 17, 2013

Difference between response.redirect and server.transfer

Respose.redirect
---------------------------------------------------
  • Respose.redirect can use another appliaction url.
  • It has round trip.
  • Its much slower than server.transfer.
  • Here also the data can pass through server variables and query string. It simply redirect the page from one page to another.
  • Eg: Response.Redirect("Default.aspx")
Server.transfer
---------------------------------------------------
  • In server.transfer we can use with in that application only.
  • It has not round trip.
  • it has faster than response.redirect
  • The main advantage of this transfer the first page to second page with better performance. The data can pass through variables, query string and also can retrive from the previous page control value.
        Eg: Server.Transfer("Default.aspx");

NOTE :By the way according to the requirement we can transfer one page to another page.

No comments:

Post a Comment