Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where in the page life cycle is the master page's load event (not OnLoad nor Page_Load)?

My understanding of the page life cycle is as follows:

  1. Page Page_PreInit

  2. MasterPage Page_Init

  3. Page Page_Init

  4. Page Page_InitComplete

  5. Page Page_PreLoad

  6. Page Page_Load

  7. MasterPage Page_Load

  8. Page_LoadComplete

  9. Page_PreRender

  10. MasterPage Page_PreRender

  11. Page Page_PreRenderComplete

  12. Page Page_SaveStateComplete

  13. MasterPage Page_Unload

  14. Page Page_Unload

Given the above, where does the MasterPage's Load event fire? Google isn't helping as quite a lot of people say Load when talking about the OnLoad event.

like image 951
Lawtonfogle Avatar asked Oct 31 '22 06:10

Lawtonfogle


1 Answers

Master Page load event is between Content page Load event and Master page controls Load event.

Check the MSDN for details

Although both Init and Load recursively occur on each control, they happen in reverse order. The Init event (and also the Unload event) for each child control occur before the corresponding event is raised for its container (bottom-up). However the Load event for a container occurs before the Load events for its child controls (top-down). Master pages behave like child controls on a page: the master page Init event occurs before the page Init and Load events, and the master page Load event occurs after the page Init and Load events.

MSDN

like image 163
Rahul Tripathi Avatar answered Nov 15 '22 11:11

Rahul Tripathi