Take the 2-minute tour ×

i see that this question has been answered: http://stackoverflow.com/questions/947134/are-there-nested-master-pages-in-asp-net-mvc

but i have a follow up questions, if i have nested master pages:

site.master section.master page

where page has a master of section.master and section.master itself has a master of site.master

can i refer to sections in both section.master and site.master?

or maybe the better questions is that i would like to the do the following and when i try to reference a section in site.master i get "can't find content section.

any suggestions?

i see examples where the page references section.master but i can't find any examples where page references site.master. For example: http://msdn.microsoft.com/en-us/library/x2b3ktt7.aspx

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

I believe you cannot reference content of parent master page if the page has child master page set.

Instead you can chain the content from child master to parent. Like this:


<asp:ContentPlaceHolder ID="TopContent" runat="server" />


<asp:Content ContentPlaceHolderID="TopContent" ID="childContent1" runat="Server">
    <asp:ContentPlaceHolder ID="ChildContent" runat="server" />


<asp:Content ContentPlaceHolderID="ChildContent" ID="pageContent1" runat="Server">
    <p>This will go to the Top.Master through Child.Master</p>
share|improve this answer
add comment

Your Answer


