ASP.Net Page Life Cycle



Asp.net Page Life Cycle


At each stage of page life cycle, the page raises some events which are:

1.       PreInit
2.       Init
3.       InitComplete
4.       LoadViewState
5.       LoadPostData
6.       PreLoad
7.       Load
8.       LoadComplete
9.       PreRender
10.   PreRenderComplete
11.   SaveStateComplete
12.   UnLoad
             

PreInit

ü  1st event in the Page Life Cycle
ü  Check the IsPostBack Property and determine whether the page  is a postback
ü  Set Theme and Master Page.
ü  Create dynamic controls.
ü  Gets and sets profile property values.

Init

ü  Initializes the control Property.
ü  Control tree is built.

IntComplete

ü  Allows tracking of view state.

LoadViewSTATE

ü  View State information is loaded into the controls

LoadPostData

ü  During this phase, contents of all the inputs field are defined.

PreLoad

ü  This event occurs before the postback data is loaded in the controls
             

Load

ü  Raised for page first then recursively for all the child control.
             

LoadComplete

ü  Loading process is completed
ü  Control event handlers are run
ü  Page Validation takes place
                                                         

PreRender

ü  Event occur just before the output is rendered
             

PreRenderComplete

ü  PreRender is recursively fired for all the child control.
             

SaveStateComplete

ü  HTML markup is generated
ü  State of the control on Page is saved
ü  Control State and view state information is saved
                                                                                     

UnLoad

                    ü  First for all controls recursively then for the page itself.


Comments

Popular posts from this blog

iframe vs embed vs object in HTML 5

Constructor in c#

What is the need of method overriding ???