Creating a Nested Master Page
(Page 1 of 4 )
Master pages are a very useful new feature of ASP.NET 2.0. If you want to create web pages that have a consistent look and feel, you can do so by using nested master pages. This article explains how to go about it.
Introduction
In a professionally created web site, web pages have a consistent look and feel displaying the graphics, controls, navigational features, and so on. Serving visually appealing rich content with consistent functionality whether it is for navigation or other usability features is a must for a satisfactory user experience. This has gone through an evolution of its own as mentioned in the previous tutorial on Master Pages, a new feature you find in ASP.NET 2.0.
The present tutorial builds on the previous one, but for reader experience it can be read independently. However, a reading of the previous tutorial would be very helpful. This tutorial takes two master pages and plugs them into a master; you may call it the top or the parent. Now each of these plugged-in master pages may show pages from their own module or compartment, sharing the parent for a higher level look and feel. These three may very well be appropriate for a corporation and two of its subsidiaries.
Before we look at the nested master pages, it may be instructive to look at a single master shown schematically in the next picture (taken from the previous tutorial). The content page and the master together are displayed when the content page is browsed. The content page is bare of HTML and other namespace references. The displayed page is therefore a merged page as far as displayed content goes.

Next: Nested Master Project >>
More ASP.NET Articles
More By Jayaram Krishnaswamy