Asp.net Page Life Cycle

At each stage of page lifecycle, page raises some events which are:-
  1. PreInit 
  2. Init 
  3. InitComplete 
  4. LoadViewSTATE 
  5. PreLoad 
  6. Load 
  7. LoadComplete 
  8. PreRender 
  9. PreRenderComplete 
  10. SaveStateComplete 
  11. UnLoad 

PreInit
  • ·         1st event of Page Life Cycle 
  • ·         Check IsPostBack Property Whether Page Is PostBack 
  • ·         Set Theme and Master Page 
Init
  • ·         Control Property is set 
  • ·         Control tree is built 
InitComplete
  • ·         Allow Tracking of View STATE 
LoadViewSTATE
  • ·         View State information is loaded  
PreLoad
  • ·         This event occurs just before the POSTBack Data is processed 
Load
  • ·         First raise for Page then recursively for all the child control. 
LoadComplete
  • ·         Loading process is completed 
  • ·         Control event handler are run 
  • ·         Page Validation takes place 
PreRender
  • ·         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 control than for the page itself 

  
 Note:  The Viewstate is actually loaded in the OnPreLoad event of the page, Just after the page Init complete.

Comments

Popular posts from this blog

iframe vs embed vs object in HTML 5

Constructor in c#

What is the need of method overriding ???