Tuesday 25 February 2014

Difference Between Server.Tansfer() and Response.Redirect()


Server.Transfer()
Response.Redirect()
It transfer user request with in the available pages in the root directoryIt transfers the user request to any of the other pages
It is faster in processing than Response.Redirect()It is slower in processing than Server.Transfer()
It has a round tripIt has no round trips
In this we will pass query string informationIn this we are unable to pass quey string information
Syntax is Server.Transfer("~/Home.aspx")Syntax is Response.Redirect("http://www.pv999.blogspot.com")
we don't need to show the real URL where we redirected the request in the users Web Browserwe want our users to be able to see the new redirected URL where he is redirected in his browser (and be able to bookmark it if its necessary)



No comments :

Post a Comment