Click here to Skip to main content
15,894,405 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
How master page is different than normal page in case of execution time.
If i request for for page then which part will execute first master page or content part
Posted
Comments
Joezer BH 11-Aug-13 5:39am    
Try to explain a little more, and perhaps provide some relevant code
patil.nitin8358 11-Aug-13 5:41am    
its straight forward question.

Just like a normal class, the base class constructor is executed before any derived class constructor can be. With master pages, they act as the "base page" for your content pages, so they are executed first. See here for a list of exact execution order for the various components of a web page: http://stackoverflow.com/questions/4552097/in-what-order-asp-net-master-pages-execute[^]
 
Share this answer
 
Refer to this link. Events in Master page / Content Pages[^]

It states that,When an end user requests a content page in the browser, the event ordering is as follows:

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.

This can also be useful.

Events in ASP.NET Master and Content Pages[^]

Regards..:laugh:
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900