Documentation for this section has not yet been entered.
The Page.MasterPageFile property is a virtual path (from the root of the application) of the master page file associated with this page. The Page.MasterPageFile property can be set only in the Page.PreInit event; attempting to set the Page.MasterPageFile property after the Page.PreInit event will throw an InvalidOperationException exception. If the Page.MasterPageFile property is not valid, an exception of type System.Web.HttpException is thrown later in the page life cycle, but no exception is thrown when the property is set in the Page.PreInit event.
Pages that have the Page.MasterPageFile property set are content pages, and therefore can contain only top-level controls that are System.Web.UI.WebControls.Content controls.