This series of articles is about ASP.NET. They are from my previous years, legacy notes on OneNote. Reviewing the concepts may be helpful even for our current programming because they have a lot of similar features, such as Angular, React, and these modern "laguanges".
- ASP.NET (1) --- ASP and ASP.NET
- ASP.NET (2) --- ASP.NET Controls
- ASP.NET (3) --- User/Custom Controls
- ASP.NET (4) - Life Cycle --- this article
A. Introduction
This article will discuss the life cycle of an ASP.NET page associated with the Application Life Cycle and Control Life Cycle.
- A - Introduction
- B - ASP.NET Page Life Cycle Overview
- C - Server Events Processing and Sequence
- D - ASP.NET Application Life Cycle
- E - Life Cycle of a Mobile Web Forms Page
- F - Control Execution Lifecycle (.NET 1.1)
B. ASP.NET Page Life Cycle Overview
Following are the different phases of the Page Life Cycle:

Roughly
- Start: Initialization
- Init events of controls and then
- The page
- Load
- Load view state,
- Load the page and then
- Load each child's controls
- Even Handling
- Postback handling,
- Validation, and
- Other events handling
- Render
- Save view state and
- Render each controls and
- The page
- Unload: Clean up such as
- Data connection or
- Opened files
Shown as:

ASP.NET Page Life Cycle Overview
C. Server Events Processing and Sequence
- Server Control Events:
- Post-back events (posting events)
- Cause the Web page to be sent back to the server for immediate processing, such as
- Button,
- LinkButton,
- ImageButton).
- Cause the Web page to be sent back to the server for immediate processing, such as
- Cached events
- Saved in the page’s view state to be processed when a post-back event occurs, such as:
- TextBox,
- DropDownList,
- ListBox,
- RadioButton and
- CheckBox).
- Saved in the page’s view state to be processed when a post-back event occurs, such as:
- Validation events:
- Handled on the page without posting back or caching, such as
- Validators
- Handled on the page without posting back or caching, such as
- Post-back events (posting events)
- Server Control Events Sequence:
- The client-side validation events are processed before the page is post back.
- The server-side validation events are processed first on the server.
- Then cached events;
- Then post-back event.
D. ASP.NET Application Life Cycle

- Application Start
- The webserver executes the application start when a user requests an application for access. In this method, it sets all global variables to default.
- Object Creation
- Object creation holds all the HTTP Context, HTTP Request, and HTTP Response by the webserver. It also contains information about the request, cookies, and browsing information.
- HTTP Application
- HTTP Application is an object created by the webserver. It helps to process all the subsequent information that is sent to the user.
- Dispose
- Dispose is an event that is called before the application is destroyed. It also helps to release manually unmanaged resources when the objects are no longer needed.
- Application End
- Application End is the last stage of the application life cycle. It helps to unload the memory.
E. Life Cycle of a Mobile Web Forms Page
| Stage | Page Event | Overridable method |
| Page initialization | Init | |
| View state loading | LoadViewState | |
| Postback data processing | LoadPostData method in any control that implements the IPostBackDataHandler interface | |
| Page loading | Load | |
| Postback change notification | aisePostDataChangedEvent method in any control that implements the IPostBackDataHandler interface | |
| Postback event handling | Any postback event defined by controls | RaisePostBackEvent method in any control that implements the IPostBackEventHandler interface |
| Page pre-rendering phase | PreRender | |
| View state saving | SaveViewState | |
| Page rendering | Render | |
| Page unloading | Unload |

Join the conversation! Your thoughts help the community grow.