After you design the look of your ASP.NET page using ASP.NET controls, you need to add the application logic. ASP.NET introduces the concept of an event-driven programming. It enables you to write code that executes in response to events raised by particular user actions. Events can be related to the page or the controls on the page. For example, you can write code to make your application do something when the page loads or a button is clicked.
Handling Page Events
Whenever you request an ASP.NET page, a particular set of events is raised in a particular sequence. This
sequence of events is called the page execution lifecycle.
Following is the sequence of events raised whenever you request a page:
1. PreInit
2. Init
3. InitComplete
4. PreLoad
5. Load
6. LoadComplete
7. PreRender
8. PreRenderComplete
9. SaveStateComplete
10. Unload
Output