Wednesday, June 27, 2012

Difference between Respost.Redirect and Server.Transfer

In this post i will given the difference between respose.redirect and server .Transefer
Server.Tranfer:
1.It can be used only for switching from one web form to another web form of the same application
2.It retains the context in which the actually requested web form is executing
3.This method can carry the current page values to new page
4.This method does not update the browser about new page that it is navigated to.
5.Page with our web application must be specified not the other web application
Respose.Redirect:
1.Redirect submits the respose to the browser asking browser to send a request for the new url and thus all the context of the previous is lost when the new url is excuting
2.It can be used for switching from web form of one web application to web form of another web application


Note:On refresh If Redirect is used it will the request for the new page where as if transfer is used browser submits the request for original page

No comments:

Bel