An Introduction to Master Pages
October 20th, 2009
As part of Microsoft's drive toward web 2.0 they introduced a web site development technology referred to as Master Pages. Master Pages allow web developers and web designers to separate elements of a web page into individual pages or a single page that is reused through out an entire site. This form of development has been around for years in the form of includes. But Master Pages take the classic include process one step further.
The WSI site you are currently viewing utilizes Master Pages to provide our web designers and web developers one file that contains all of the "global" design elements in our site. The header, main navigation, footer and other HTML or JavaScript's are located in the master file. This allows for site wide changes to take place by updating one page.
In addition to Master Pages, includes in the form of .ascx files are used for sectional navigation on both the right and left side of the site. This allows our developers to add navigation items to an entire section of the website by updating one navigation file, rather than updating every single page.
Let's take a little closer look at our website and how it utilizes user controls in the form of includes and master pages to provide quicker development and website updates.
Let's start with a list of the major layout areas of this site.
We have a:
- Meta Information
- Header
- Main Navigation
- Left Navigation
- Content Area
- Right Navigation
- Footer
The header, footer, right navigation and main navigation are a global constant for this sites web design. So these items we have defined in our master page. The meta information, left navigation and content area are the only areas that change per page. Default values for these areas are defined in the websites master page, but have been marked in the master page as "dynamic".