Create a page from a master page
A content page is a page based on a master page. When a user views a content page in the browser, the user sees all the content from the master page, plus all the content you add in the content controls on the content page. Unlike HTML pages based on a Dynamic Web Template (DWT), however, a page based on a master page does not include the master page content in the actual file on the server, so you cannot see it in Code view. It is displayed for you in Design view, but it is not editable.
To create a page based on a master page in the Folder List panel
- In the Folder List panel, right-click the master page, and select New from Master Page.
To create a page based on a master page by using the New dialog box
On the File menu, click New.
In the Page tab of the New dialog box, select General or ASP.NET in the list at the left and Create from Master Page in the center list.
Set the default programming language for your page in the Programming Language dropdown in the Options area.
In the first Select a Master Page dialog box, choose either Use default Master Page (if one is specified in the web.config file for the site) and click OK or select the Specific Master Page option button and click Browse.
For information about setting a default master page in a web.config file, see the MSDN topic How to: Create Web.config Files (Visual Studio) .
If you clicked Browse, select the desired master page in the second Select a Master Page dialog box and click OK.
If you don't need to set the Programming Language for the page, you can open the Select a Master Page dialog box by resting your pointer on New on the File menu to expand the submenu, and then click Create from Master Page.
You can also attach a master page to an .aspx file that was not created based on the master page.
To attach a master page to an .aspx file
On the Format menu, click Master Page, and then click Attach Master Page.
In the Select a Master Page dialog box, choose either Use default Master Page (if one is specified in the web.config file for the site) and click OK or select the Specific Master Page option button and click Browse.
If you clicked Browse, locate and click the master page that you want in the Select a Master Page dialog box and then click OK.
Once you have created a page based on a master page, you can add content to the Content controls on the page. For details, see Add content to a content page.
Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.