Registering Master Pages in Web Configuration : masterPageFile « Configuration « ASP.NET Tutorial






Apply the SimpleMaster.master Master Page to every page contained in the same folder (or subfolder) as the web configuration file.

A MasterPageFile attribute in a content page takes precedence over a Master Page specified in the web configuration file.

File: FolderA\Web.Config

<configuration>
<system.web>
  <pages masterPageFile="~/SimpleMaster.master" />
</system.web>
</configuration>








16.22.masterPageFile
16.22.1.Registering Master Pages in Web Configuration