<%@ Master Language="C#" AutoEventWireup="true" Debug="true" %>
<script runat="server">
void Page_Init(object
sender, EventArgs e)
{
Page.Trace.Warn("sampletutorial master", "Page_Init");
}
void Page_Load(object
sender, EventArgs e)
{
Page.Trace.Warn("sampletutorial
master", "Page_Load");
}
</script>
<html>
<head>
<title>The ExForSys Tutorials Website</title>
</head>
<body style="margin:0;font-family:verdana;">
<form id="Form1" runat="server">
<table width="100%" bgcolor="beige" style="BORDER-BOTTOM:silver
5px solid">
<tr>
<td><h1>Learning to use ASP.NET 2.0</h1></td>
</tr>
</table>
<br>
<table width="100%" style="border:solid
1px black;">
<tr><td><asp:contentplaceholder runat="server" id="Toolbar" /></td></tr>
<tr><td><asp:contentplaceholder runat="server" id="PageBody" /></td></tr>
<tr><td align="center" style="font-size:80%;background-color:lightcyan;">Copyright ExForSys 2005</td></tr>
</table>
</form>
</body>
</html>
Now name the second master ExForSystut.master and enter the
following code
<%@ Master Language="VB" MasterPageFile="Sampletutorial.master" Debug="true" AutoEventWireup="true"%>
<asp:content ID="Content1" runat="server" contentplaceholderID="Toolbar">
<table width="100%">
<tr bgcolor="lightcyan">
<td width="100%"><h3>Great Tutorials!</h3></td>
</tr>
<tr>
<td width="100%" style="text-align:center">
<asp:contentplaceholder runat="server" id="Menu" />
</td>
</tr>
</table>
</asp:content>
<asp:content ID="Content2" runat="server" contentplaceholderID="PageBody">
<table>
<tr>
<td>
<img src="logo.gif" align="right">
</td>
<td>
<h1>Your one stop for Tutorials--ExForSys 2005</h1>
<h2><a href="About.aspx">Click to learn more</a></h2>
</td>
</tr>
</table>
</asp:content>
Now create an aspx file called About.aspx and enter the
following code.
<%@ Page language="C#" masterpagefile="ExForSystut.master" %>
<script runat="server">
void OnRegister(object
sender, EventArgs e)
{
}
void OnLogin(object
sender, EventArgs e)
{
}
void OnSample(object
sender, EventArgs e)
{
}
</script>
<asp:content ID="Content1" runat="server" contentplaceholderID="Menu">
<div>
<asp:button ID="Button1" runat="server" text="Sample" onclick="OnSample" width="90px" />
<asp:button ID="Button2" runat="server" text="Register" onclick="OnRegister" width="90px" />
<asp:button ID="Button3" runat="server" text="Login" onclick="OnLogin" width="90px" />
</div>
</asp:content>