MasterPage in MasterPage?

I'm wondering if there is a way to implement something like this:

A site has two pages with subpages. The top two pages use the same MasterPage but, depending on the top page, I'd like to have the same layout within the original MasterPage. E.g., let's say there is an audio page and a blog page. The audio page may have a menu of its own with categories, which the same for all audio pages, but still resides within the top-level MasterPage, and the same for the blog pages. Simply put - is there a way to have MasterPage's within ContentPlaceHolders?
Who is Participating?
SteveH_UKConnect With a Mentor Commented:
You cannot put MasterPages withing ContentPlaceHolders, but you can nest MasterPages.  In this model, you would have three Master Pages:


Using three masters ensures that the design is consistent throughout. In this case, Page.Master.Master would always return the SiteMaster master page.

In the SiteMaster master page, you expose all the ContentPlaceHolders that you need.  Then, in DefaultPageMaster and in AudioPageMaster you must create new ContentPlaceHolders within Content blocks corresponding to the SiteMaster's ContentPlaceHolders.  A page cannot directly use the ContentPlaceHolders of an indirect master page.

An alternative to this method would be to include a user web control on each of your audio pages.

Note as well that ASP.NET 2.0 supports multiple master pages, but Visual Studio 2005 does not support them in design view.  This doesn't prevent you using them, and VS 2008 and Expression Web both support multiple master pages.
Thanks for the points :)
All Courses

From novice to tech pro — start learning today.