Page Life Cycle in ASP.Net

With in Each stage of the life cycle the page raises Events that you can handle to run your own code. These are as follows
Raised before the Initialization stage begins Here the Ispostback property is checked to determine wheather the first time the page is being processed.

Raised after all the controls have been initialized.
3-Init complete:
Raised at the end of the page initialization stage.

Raised after the page loads view state for itself and all its controls.


Here the page calls the OnLoad method,Use this method to set the properties in controls and to establish the database connection.

6-Load Complete
Raised at the end of the event handling stage.

The page object raises the prerender event to make the final changes to the contents of the
the page or its controls before the rendering stage begins.

8-PreRender Complete-
Raised after each data bound control whose DataSourceID property is set calls its DataBind method.

9-Save State Complete-
Raised after viewstate and controlstate have been saved for the page and for all the controls.

All the ASP.Net webserver controls have a Render method that writes out the controls markup to the browser.

Raised for each control and then for the page.This event is used to do the final cleanup work, like closing the open files and database connections.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s