Search Search

#1 worldwide
FREE Coding Lessons

since 1996
   THE BEST WAY to learn ASP & Asp.net!
Advertise Here!
click for details
Credits Host:
DiscountASP.net
Server Admin:
The "Team"
Contact Info.
Charles M. Carroll
<Asp.net blog>
<personal site>
[prev. Lesson]  Third Party Server Controls
     [next Lesson]  Master Pages (many content regions) FREE, works in 1.0/1.1

MasterPage from Metabuilders.com
by Charles Carroll

This page demonstrates how MetaBuilder MasterPages make complex layouts easy to achieve!
Download Master Page control free from http://www.metabuilders.com/Tools/MasterPages.aspx to make this work on your server.

Sample page StyleA!

   filename=/experiments/masterpages/Page1_StyleA.aspx

<Test Script Below>


<%@ Register TagPrefix="mp" Namespace="MetaBuilders.WebControls.MasterPages" Assembly="MetaBuilders.WebControls.MasterPages" %>



<mp:contentcontainer MasterPageFile="StyleA.ascx"  id="MPContainer" runat="server">
<mp:content id="BasicContent" runat="server">
    <h2>Headline</h2>
    This is some content<br>
    Lots of SampleText<br>
    Text is Good<br>
    <h3>Now the content is done</h3>
</mp:content>

</mp:contentcontainer>

Sample page StyleB!

   filename=/experiments/masterpages/Page1_StyleB.aspx

<Test Script Below>


<%@ Register TagPrefix="mp" Namespace="MetaBuilders.WebControls.MasterPages" Assembly="MetaBuilders.WebControls.MasterPages" %>
<mp:contentcontainer MasterPageFile="StyleB.ascx" id="MPContainer" runat="server" >
<mp:content id="BasicContent" runat="server">

    <h2>Headline</h2>
    This is some content<br>
    Lots of SampleText<br>
    Text is Good<br>
    <h3>Now the content is done</h3>

</mp:content>
</mp:contentcontainer>

Master page UserControl StyleA!

filename=/experiments/masterpages/StyleA.ascx


<%@ Register TagPrefix="mp" Namespace="MetaBuilders.WebControls.MasterPages" Assembly="MetaBuilders.WebControls.MasterPages" %>
<html><body><mp:nobugform runat="server">

<h1>New Header</h1>
<mp:region id="pubdate" runat="server">xx/xx/xx</mp:region>        
<hr>
<Table width="100%">
    <tr>
        <td width="20%" bgcolor="silver"><h1>L<br>e<br>f<br>t</td>    
        <td width="60%">
        <mp:region id="BasicContent" runat="server">Default Content</mp:region>        
        </td>
        <td width="20%" bgcolor="orange"><h1>R<br>i<br>g<br>h<br>t</td>    
    <tr>
</Table>
<hr>
</hr>
<h1>New A Footer</h1>
<mp:region id="Authors" runat="server">--authors--</mp:region>        
</mp:nobugform></body></html>

Master Page UserControl StyleB!

filename=/experiments/masterpages/StyleB.ascx


<%@ Register TagPrefix="mp" Namespace="MetaBuilders.WebControls.MasterPages" Assembly="MetaBuilders.WebControls.MasterPages" %>
<html><body><mp:nobugform runat="server">
<table bgcolor="blue"><tr><td>
<h1>A Totally Different Layout</h1>
</td></tr><table>
        <mp:region id="BasicContent" runat="server">Default Content</mp:region>
<table bgcolor="blue"><tr><td>
<h1>A Totally Different Footer</h1>
</td></tr><table>
</mp:nobugform></body></html>
Chaz Wish List
Tall Tip $5
Grande Tip $20
Venti Tip $39
Tip Jar Thanks
2004 Thanks
2005 Thanks
HUGE Tip -love site