ASP.NET Tutorial/Configuration/masterPageFile

Материал из .Net Framework эксперт
Перейти к: навигация, поиск

Registering Master Pages in Web Configuration

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>