Tag: asp.net
ASP.NET Page Lifecycle
Page Life Cycle Events
As ASP.NET processes a page through its stages, various events are raised for the page and its related controls. You write code to handle these events and thus respond to various actions related to the processing of a page. For example, you might wish to write code that gets called when a page is first loaded to determine if the user is requesting the page or posting back to the server. This is a common scenario. When a page is first requested you often have to initialize data and controls. However, when it posts back you do not wish to run this code. Another common example is when a user clicks a button. You want to respond to the click event for that button only. Knowing which events are called in what order is important to making sure your code executes properly and can be debugged. Table 2-1 contains an ordered list of the more common events that are triggered when a page is processed by ASP.NET.
the whole 9 yards
Step 0: The Browser Makes an HTTP Request for an ASP.NET Web Page
The entire process begins with a Web browser making a request for an ASP.NET Web page. For example, a user might type into their browser’s Address window the URL for this article, http://aspnet.4guysfromrolla.com/articles/011404.aspx. The Web browser, then, would make an HTTP request to the 4Guys Web server, asking for the particular file /articles/011404-1.aspx.

