Monday, 21 May 2012

Differences between Server,Transfer and response.Redirect ?

Following are the major differences between them:-

Response. Redirect sends message to the browser saying it to move to some different page, while server. Transfer does not send any message to the browser but rather redirects the user directly from the server itself. So in server. Transfer there is no round trip while response. Redirect has a round trip and hence puts a load on server.

Using Server. Transfer you cannot redirect to a different from the server itself. Example if your server is you cannot use server. Transfer to move to but yes, you can move to, i.e. with in websites. Cross server redirect is possible only by using Response. Redirect.

With server. Transfer you can preserve your information. It has a parameter called as preserveForm.Therefore, the existing query string etc. will be able in the calling page.

If you are navigating within the same website use Server. Transfer or else go for response.Redirect ()

No comments:

Post a Comment