How To Add Master Page And Content Page In Asp.Net (Part 1/2)
A Master Page provides a common template for other pages.
First of all, On Visual Studio Click on File --> New --> Project..
A new window will open as shown below.
Select Web --> Asp.Net Empty Web Application.
This will create a new Asp.Net Empty Web Application as shown below.
Now Right Click on the Project Icon and Select Add --> Add New Item
Select Master Page from the new window as shown below
Name the Master Page with a preffered name and click the Add Button.
The extension of the master page will be .Master like Main.Master
If you open the Master Page, it contains HTML, HEAD and BODY Tag.
But in Content Page you cannot find any of the above.
You will find ContentPlaceHolder both in Head and Body region.
Common thingd across all pages will be placed outside the ContentPlaceHolder.
Things outside the ContentPlaceHolder will not be edited in Content Pages.
In Content Pages, only the area inside ContentPlaceHolder will be available for editing.
Like this way we can Add Master Page In Asp.Net Wep Application.