Saturday, 16 May 2009

ASP.NET page event ordering

  • Master page child controls initialization: All server controls contained within the master page are first initialized.
  • Content page child controls initialization: All server controls contained in the content page are initialized.
  • Master page initialization: The master page itself is initialized.
  • Content page initialization: The content page is initialized.
  • Content page load: The content page is loaded (this is the Page_Load event followed by the Page_LoadComplete event).
  • Master page load: The master page is loaded (this is also the Page_Load event followed by the Page_LoadComplete event).
  • Master page child controls load: The server controls on the master page are loaded onto the page.
  • Content page child controls load: The server controls on the content page are loaded onto the page.

No comments: