Master Page
Master Page is a layout which will give you the consistent look, feel and behavior for all the pages (or group of pages) in your web site or application.
Basically Master page is a template for other pages which shared layout and functionality with the pages. Master Page contains the ContentPlaceHolder, which is overridden by the content pages. Content page contains only the content. The output is a combination of Master page and content page.Step 1: Create a New Web Site
Go to File menu then
New then Web Site then Select ASP.Net Empty
Web Site like the following.
Step 2: Take a Master Page
Right click on the project in the solution bar Select Add New Item and Select Master Page from the Template and give a name or leave the name and click Add.

Step 3: Write Code as follows
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>
<asp:ContentPlaceHolder ID="title" runat="server">
</asp:ContentPlaceHolder>
</title>
<link href="Styles/main.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div class="wrapper">
<div class="menu">
<ul>
<li class="navigation_first_item"><a href="Default.aspx">Home</a></li>
<li><a href="Category.aspx">Category</a></li>
<li><a href="#">Contact Us</a></li>
<li><a href="#">About Us</a></li>
</ul>
</div>
<div class="clear">
</div>
<div class="content">
<asp:ContentPlaceHolder ID="contentBody" runat="server">
</asp:ContentPlaceHolder>
</div>
<div class="clear">
</div>
<div class="footer">
<h2>
[email protected]</h2>
</div>
</div>
</form>
</body>
</html>
Step 4: Take Default and Category page
Right Click on the project and click Add New Item and then select Web Form and make sure you are selecting the check box “Select Master Page“.

Style Sheet
/* --------- RESET --------- */
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,textarea,p,blockquote,th,td
{
padding: 0;
margin: 0;
}
/*body*/
body
{
background-color: rgb(237, 237, 237);
font-family: "Arial",Helvetica,sans-serif;
font-size: 12px;
}

Martin vonSteinPosted Nov 16, 2018, 3:48 AM
Hi Ripon, I really like that template and your tutoriol on YouTube. Could you point out how one could highlight the list item that had been clicked on in the menu? That would make the site navigation easier. Thanks. Martin