Building an ASP.NET 2.0 Master Page in Three Steps - Step 1: Adding a Master.master page to your site
(Page 2 of 5 )
Create a web site and call it http://localhost/Tutorials. This comes with a default.aspx page. Go to the menu item Website and click to get the drop down. From the drop down click on Add New Item... as shown in the following picture.

This gives access to the Visual Studio installed templates window as shown in the next picture.

Highlight Master Page and it will add a MasterPage.master page to your site when you hit the Add button. Before you hit the Add button, however, change the default name to anything different. Here it is named Tutorial.master. Take a look at the source of Tutorial.master, which is shown in the next picture.

Two items distinguish this page from an aspx page. It has the @Master directive, and embedded in its body there is an asp control called contentplaceholder.This is a server control.
The next picture shows the Design view of this Master Page.

The Master Page is like a super template; into it goes the content that will come from a yet-to-be-created web page.
There is yet another difference between a Master Page and a regular ASPX page. Even though it has HTML markup, you cannot browse the master on Explorer! In fact if you right click the Master Page, the View in Browser option is missing.
In principle all the other pages use the Master as their template and add their content to the Master's skeleton. When the page is rendered, the Master and the content from the page will be merged when the client browses the page as explained earlier.
Next: Step 2: Adding some features to the Master >>
More .NET Articles
More By Jayaram Krishnaswamy