ASP.NET
  Home arrow ASP.NET arrow Page 5 - How to Use Master Pages (Conclusion)
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

How to Use Master Pages (Conclusion)
By: Murach Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 8
    2005-12-08

    Table of Contents:
  • How to Use Master Pages (Conclusion)
  • How to add content to a page
  • How to access master page controls from a content page
  • How to access a public property of the master page from a content page
  • How to use nested master pages
  • How to create nested master pages

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    How to Use Master Pages (Conclusion) - How to use nested master pages


    (Page 5 of 6 )

    In some web applications, particularly large ones, one or more sections of the web site may have common formatting elements in addition to the elements that apply to the entire site. In that case, you can use nested master pages as described in the following topics.

    How nested master pages work

    Figure 3-10 shows how nested master pages might be used in the Halloween Store application. Here, a portion of the web site is devoted to presenting do-it-yourself project instructions that show the user how to create home-made Halloween decorations and props. In addition to the other elements from the master page, each of the pages in this section of the web site has an additional banner that displays the text “Do-It-Yourself Projects.”

    To create this additional banner, a second master page named ProjectsMaster.master is used. The content page (in this example, Tombstone.aspx) specifies that its master page is ProjectsMaster.master. Like any other master page, the ProjectsMaster master page includes a content placeholder. However, unlike regular master pages, the ProjectsMaster master page also includes a Master directive that specifies the application’s main master page, MasterPage.master. Thus, ProjectsMaster.master is nested within MasterPage.master. As you can see, elements from all three pages— MasterPage.master, ProjectsMaster.master, and Tombstone.aspx—are combined to create the final page that’s sent to the browser.

    A master page that’s nested within another master page is called a child master, and the master page it’s nested in is called a parent master. Note that a parent master can also be a child master. In other words, you can nest master pages more than one level deep. However, few applications require more than one level of nesting.

    An application with nested master pages (figure 3-10) 

    Description

    • Master pages can be nested. This lets you create elements that are common to all pages of a web site and other elements that are common to a subset of pages within the site.
    • When you nest master pages, the content placeholder of one master page, called the parent master, holds another master page, called the child master.

    More ASP.NET Articles
    More By Murach Publishing


       · This article is an excerpt from the book "Murach’s ASP.NET 2.0 Upgrader’s Guide: VB...
     

    Buy this book now. This article is excerpted from chapter three of the book Murach’s ASP.NET 2.0 Upgrader’s Guide: VB Edition, written by Anne Boehm and Joel Murach (Murach, 2005; ISBN: 1-890774-36-7). Check it out today at your favorite bookstore. Buy this book now.

    ASP.NET ARTICLES

    - Developing a Mini ASP.NET AJAX Server Centri...
    - Disadvantages of the ASP.NET MVC Framework
    - Advantages of the ASP.NET MVC Approach
    - ASP.NET Web Forms Weaknesses
    - ASP.NET Web Forms Meets ASP.NET MVC
    - Source Code for Saving and Retrieving Data w...
    - Using GridView to Save and Retrieve Data wit...
    - Handling Dynamic Images in ASP.NET 3.5 AJAX ...
    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX

     
    Best Practices for Windows Vista Migration Presentation
    Dell and Microsoft recently held a series of face-to-face seminars entitled, &qu....

     
    Creating a Culture for Code Reuse
    If you oversee development teams you know that like it or not proprietary and ex....

     
    Keys to Web Application Acceleration: Advances in Delivery Systems
    Accelerate Web apps by up to 5x. Ensure significantly faster access to the Web a....

     
    Optimizing Application Monitoring
    Tired of finding out from your customers that you're offline? This white paper e....

     
    Solaris to Solaris Migration -- Migrating applications from Sun SPARC to Dell PowerEdge R900
    This comprehensive Migration Guide reviews the approach that Principled Technolo....

     




    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT