Development ASP.Net Tutorial

File: Default.master
<%@ Master Language="C#" %>
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

    public string BodyTitle
    {
        get { return ltlBodyTitle.Text; }
        set { ltlBodyTitle.Text = value; }
    }



    
        html
        {
            background-color:silver;
        }
        .content
        {
            margin:auto;
            width:700px;
            background-color:white;
            padding:10px;
        }
        h1
        {
            border-bottom:solid 1px blue;
        }
    
    Property Master


    
    
    


            id="ContentPlaceHolder1"
        runat="server" />
    

    


            
File: Default.aspx
<%@ Page Language="C#" MasterPageFile="~/Default.master" %>
<%@ MasterType VirtualPath="~/Default.master" %>

    void Page_Load()
    {
        if (!Page.IsPostBack)
        {
            Master.BodyTitle = "The Body Title";
        }
    }

    ID="Content1"
    ContentPlaceHolderID="ContentPlaceHolder1"
    Runat="Server">
    Content, Content, Content, Content
    Content, Content, Content, Content