ASP.NET master pages allow you to create a consistent layout for the pages in your application. A single master page defines the look and feel and standard behavior that you want for all of the pages (or a group of pages) in your application. You can then create individual content pages that contain the content you want to display. When users request the content pages, they merge with the master page to produce output that combines the layout of the master page with the content from the content page.
Admin.master
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Admin.master.cs" Inherits="Adminpages_Admin" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link rel="Stylesheet" type="text/css" href="../Mystyle.css" /> </head>
<body>
<form id="form1" runat="server">
<asp:ContentPlaceHolder ID="Body" runat="server">
</asp:ContentPlaceHolder>
</form> </body>
</html>
Index.aspx
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Index.aspx.cs" Inherits="Adminpages_Index"
MasterPageFile="~/Adminpages/Admin.master"
%>
<asp:Content runat="server" ID="Content1" ContentPlaceHolderID="Body">
<table width="100%" align=center >
<tr>
<td align="center" style="color:Silver">
Hello Welcome
</td>
</tr>
</table>
</asp:Content>
Master Pages breaks Menu control
When you want to use menus with Master Pages then you should delete following code from web.config file
<xhtmlConformance mode="Legacy"/>