Wednesday, March 10, 2010 page life cycle

When user requests any page, the page goes to page life cycle in
which it perform a series of processing state. ASP.Net page will execute some methods
in sequence in its life cycle. All those methods are explained below:

Method Name


Pre Initialization

During page initialization, controls on the page are available and Unique id property is set. Theme is also applied in this method. If page is post back then posted data is not loaded in this method and also controls state is not restored from the view state.


During load, if page is post back then controls is restored from the view state or control state


During validation, the validate method of all the validation control is executed which set IsValid property of validation control

Post event handling

If page is post back then handle event handling


Before rendering, view state data are saved.


Unload is called after page is successfully rendered, sent to the client and is ready to dispose. At this point Response and Request object are unloaded and any cleanup is performed.

No comments:

Post a Comment

DotNet Code Guru