0% found this document useful (0 votes)
12 views3 pages

Master Page97

The document describes a master page and content page in ASP.NET. The master page defines the overall page layout with left and right columns and content placeholders. The content page then fills the placeholders with content for each column.

Uploaded by

sharanj764
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views3 pages

Master Page97

The document describes a master page and content page in ASP.NET. The master page defines the overall page layout with left and right columns and content placeholders. The content page then fills the placeholders with content for each column.

Uploaded by

sharanj764
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Master Page

<%@ Master Language="C#" %>

<!DOCTYPE html>

<html>
<head id="Head1" runat="server">
<style type="text/css">
html
{
background-color:silver;
font:14px Arial,Sans-Serif;
}
.content
{
margin:auto;
width:700px;
background-color:white;
border:solid 1px black;
}
.leftColumn
{
float:left;
padding:5px;
width:200px;
border-right:solid 1px black;
height:700px;
}
.rightColumn
{
float:left;
padding:5px
}
.clear
{
clear:both;
}
</style>
<title>Master</title>
</head>
<body>
<form id="form1" runat="server">
<div class="content">
<div class="leftColumn">
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
<div class="rightColumn">
<asp:ContentPlaceHolder id="ContentPlaceHolder2" runat="server">
</asp:ContentPlaceHolder>
</div>
<br class="clear" />
</div>
</form>
</body>
</html>
Content page

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<br />Content in the first column
<br />Content in the first column
<br />Content in the first column
<br />Content in the first column
<br />Content in the first column
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
<br />Content in the second column
<br />Content in the second column
<br />Content in the second column
<br />Content in the second column
<br />Content in the second column
</asp:Content>

You might also like