In what order asp.net master pages execute

后端 未结 2 441
野性不改
野性不改 2021-01-07 00:37

I m using master page in my project. I want to know the order in which the page loads of both master page and web page executes also about the scripts

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-07 01:06

    1. Master page child controls initialization: All server controls contained within the master page are first initialized.
    2. Content page child controls initialization: All server controls contained in the content page are initialized.
    3. Master page initialization: The master page itself is initialized.
    4. Content page initialization: The content page is initialized.
    5. Content page load: The content page is loaded (this is the Page_Load event followed by the Page_LoadComplete event).
    6. Master page load: The master page is loaded (this is also the Page_Load event).
    7. Master page child controls load: The server controls on the master page are loaded onto the page.
    8. Content page child controls load: The server controls on the content page are loaded onto the page.

    http://it.toolbox.com/blogs/coding-dotnet/events-in-master-page-content-pages-16262

提交回复
热议问题