Frequently Asked Interview Questions

Run-time Behavior of Master Pages

At run time, master pages are handled in the following sequence:


  • Users request a page by typing the URL of the content page.
  • When the page is fetched, the @ Page directive is read. If the directive references a master page, the master page is read as well. If this is the first time the pages have been requested, both pages are compiled.
  • The master page with the updated content is merged into the control tree of the content page.
  • The content of individual Content controls is merged into the corresponding ContentPlaceHolder control in the master page.
  • The resulting merged page is rendered to the browser.
The process is illustrated in the following diagram.
Master pages at run time

Most Visited Pages

Home | Site Index | Contact Us