Wednesday, March 10, 2010

asp.net page life cycle


When user requests any asp.net page, the page goes to asp.net 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

Description

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.

Load

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

Validation

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

Rendering

Before rendering, view state data are saved.

Unload

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