Wednesday, September 10, 2008

ASP.NET FAQs

What is the difference between Response.Write() and Response.Output.Write()?
Ans.Response.Output.Write() allows you to write formatted output.

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

Ans.Server.Transfer transfers page processing from one page directly to the next page without making a round-trip back to the client’s browser.This provides a faster response with a little less overhead on the server.Server.Transfer does not update clients url historylist or current url.Response.Redirect is used to redirect the user’s browser to another page or site.This performs a trip back to the client where client’s browser is redirected to the new page.The user’s browser history list is updated to reflect the new address.
What methods are fired during page load in ASP.NET 1.1?
Ans.

Init() - when the page is instantiated
Load() - when the page is loaded into server memory
PreRender() - the brief moment before the page is displayed to the user as HTML
Unload() - when page finishes loading.