I have a main MasterPage which has a single column layout for the web application I am currently designing. I want to re-use the existing MasterPage to implement a two column layout using Nested MasterPages which was possible on previous releases of the ASP.NET MVC Framework but I can’t seem to get it to work in the RC2.
The following is the code I am currently working on,
<%@ Master Language='C#' MasterPageFile='~/Views/Shared/Site.Master' Inherits='System.Web.Mvc.ViewMasterPage' %> <%@ Import Namespace='RHP.WebMvcApplication.Library' %> <asp:Content ID='Content1' ContentPlaceHolderID='TitleContent' runat='server'> <asp:ContentPlaceHolder ID='TitleContent' runat='server'> Member List </asp:ContentPlaceHolder> </asp:Content> <asp:Content ID='Content2' ContentPlaceHolderID='MainContent' runat='server'> <div id='mainLeftContent'> <h3>Options</h3> <%= Html.MenuCurrentChildren(); %> </div> <div id='mainContent'> <% Html.RenderPartial('MemberApplicationStateControl'); %> <asp:ContentPlaceHolder id='MainContent' runat='server'> </asp:ContentPlaceHolder> </div> </asp:Content>
Nevermind! I had a bug in the page that was stopping the page from being rendered so it does work now.
The bug was the (;):
The fix was:
Its the little stuff that makes programming interesting.