Monday, May 31, 2010

What is the difference between Server.Transfer and Response.Redirect?

Server.Transfer(): Using this statement it not only redirects to the next page but also all the content of the page is transferred to next page. Data is persisted to next pages using Context.ItemCollection which keeps the page state alive.

Response.Redirect(): Using this statement the Context.Items loses the persistence to transfer the content to next page. Hence every page is treated as a seperate page.

No comments:

Post a Comment