I m using master page in my project. I want to know t开发者_运维知识库he order in which the page loads of both master page and web page executes also about the scripts
- 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).
- 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.
http://it.toolbox.com/blogs/coding-dotnet/events-in-master-page-content-pages-16262
From: https://msdn.microsoft.com/en-us/library/dct97kc3.aspx
The following is the sequence in which events occur when a master page is merged with a content page:
- Content page PreInit event.
- Master page controls Init event.
- Content controls Init event.
- Master page Init event.
- Content page Init event.
- Content page Load event.
- Master page Load event.
- Master page controls Load event.
- Content page controls Load event.
- Content page PreRender event.
- Master page PreRender event.
- Master page controls PreRender event.
- Content page controls PreRender event.
- Master page controls Unload event.
- Content page controls Unload event.
- Master page Unload event.
- Content page Unload event.
精彩评论