QA


Q&A

Q1:

Can master pages be nested? That is, can a master page inherit a master page? For example, I want a very high-level sitewide look and feel defined by a parent master page. Then, for various sections of the site, I want a sectionwide template that borrows from the parent master page's look and feel, but defines some settings unique to the section. Is this possible?

A1:

Yes, nested master pages are allowed. With nested master pages, the "root" master page can have HTML markup and Web control syntax, along with ContentPlaceHolders. A master page that inherits from that root master page can have only Content Web controls, just like a normal ASP.NET page that inherits from a master page. However, inside these Content Web controls can be additional ContentPlaceHolders.

For more information on nested master pages and master pages in general, check out "Master Pages in ASP.NET 2.0" at http://odetocode.com/Articles/419.aspx as well as Microsoft's official master page-related documentation, available at http://msdn2.microsoft.com/en-us/library/18sc7456(en-US,VS.80).aspx.




Sams Teach Yourself ASP. NET 2.0 in 24 Hours, Complete Starter Kit
Sams Teach Yourself ASP.NET 2.0 in 24 Hours, Complete Starter Kit
ISBN: 0672327384
EAN: 2147483647
Year: 2004
Pages: 233

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net