Welcome to Hellrocker's Collections

Hope its all of some use to computer users.............

Tuesday, January 31, 2012

ASP.NET Page Lifecycle... confusing??? I dont think so...

Ever faced the question about ASP.NET page life cycle in interview... pretty easy... but if MasterPage comes in... it makes it slight difficult... isn't it??? and what if the controls are present on the page.. and few on MasterPage... things are getting tough... isn't it...

To make the thinks easier just go through the chronological order of the events that are followed from pre-init to unload...

Following is the order of events of an ASP.NET page when using master page... read on...
  1. Page PreInit
  2. MasterPageControl Init
  3. PageControl Init
  4. MasterPage Init
  5. Page Init
  6. Page ViewStateLoad
  7. MasterPage ViewStateLoad
  8. Page PreLoad
  9. Page Load
  10. MasterPage Load
  11. MasterPageControl Load
  12. PageControl Load
  13. PageControl Event
  14. MasterPage BubbleEvent
  15. Page BubbleEvent
  16. PageLoad Complete
  17. Page Prerender
  18. MasterPage PreRender
  19. MasterPageControl PreRender
  20. PageControl PreRender
  21. Page PreRenderComplete
  22. MasterPage ControlStateSave
  23. Page ControlStateSave
  24. Page ViewStateSave
  25. MasterPage ViewStateSave
  26. Page SaveState
  27. MasterPageControl Unload
  28. PageControl Unload
  29. MasterPage Unload
  30. Page Unload

0 comments:

Post a Comment