In my project i have a root MasterPage, and i need another MasterPage based on the first one to be used by some content pages.
The problem is that Visual Studio doesn’t do this automatically (i’m using Visual Studio 2008, with .net 3.5), so here’s how to do it (i assume you have setup your Main MasterPage) :
1/ Create the second masterpage and select the Main MasterPage
2/ Create a content page and select the Second MasterPage as a MasterPage
3/ in The Second MasterPage insert this line into the Content Tag :
<asp:ContentPlaceHolder id="cpx" runat="server"></asp:ContentPlaceHolder>
4/ In the content page add this tag :
<asp:Content ID="c1" ContentPlaceHolderID="cpx" Runat="Server">My final page
</asp:Content>
That’s all, and following this logic you can setup many levels of MasterPages.
© Daxii.com