title: Value cannot be null or empty. Parameter name: contentPath
body: <p>I have a multi-level Layout master pages in an ASP.NET MVC 4.</p>
  
  <p>I have the following:</p>
  
  <pre><code>&lt;title&gt;@ViewBag.Title&lt;/title&gt;
  </code></pre>
  
  <p>The order of Layout pages is as follows:</p>
  
  <ol>
  <li>_Layout.cshtml</li>
  <li>_SubLayout.cshtml (based on _Layout.cshtml)</li>
  <li>Index.cshtml (based on _SubLayout.cshtml)</li>
  </ol>
  
  <p>I am setting the @ViewBag.Title inside Index Action. However, I get the following exception:</p>
  
  <blockquote>
    <p>Value cannot be null or empty. Parameter name: contentPath</p>
  </blockquote>
  
  <hr>
  
  <p>Here is the code I have. I am simply making the code of ASP.NET Design Patterns books work for VS 2012 / MVC 4</p>
  
  <p><strong>_Layout.cshtml</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;title&gt;@ViewBag.Title&lt;/title&gt;
      &lt;link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" /&gt;
      &lt;meta name="viewport" content="width=device-width" /&gt;
      &lt;link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /&gt;  
  &lt;/head&gt;
  &lt;body&gt;  
  &lt;div id="main"&gt;    
      &lt;div id="header"&gt;        
          &lt;span&gt;&lt;a href="@Url.Content("")"&gt;
          &lt;img alt="Agatha's Clothing Store" 
               src="@Url.Content("/Content/Images/Structure/lg_logo.png")" 
               border="0" /&gt;&lt;/a&gt;&lt;/span&gt;        
      &lt;/div&gt;   
  
      &lt;div id="headerSummary"&gt;        
           @RenderSection("headerBasketSummary", required: false)                   
      &lt;/div&gt;
      &lt;div class="topBarContainer"&gt;          
          &lt;div id="background"&gt;         
              &lt;div id="navigation"&gt;
                  @RenderSection("MenuContent", required: false)
              &lt;/div&gt;    
              &lt;div id="content"&gt;
                 @RenderBody()
              &lt;/div&gt;            
              &lt;div style="clear: both;" /&gt;
          &lt;/div&gt;  
      &lt;/div&gt;          
      @Html.Partial("_SiteFooter")
  &lt;/div&gt;
  
  &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"&gt;&lt;/script&gt;
  &lt;script src="//cdnjs.cloudflare.com/ajax/libs/json2/20121008/json2.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="@Url.Content("~/Scripts/jquery-jtemplates.js")"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="@Url.Content("~/Scripts/agatha-common-scripts.js")"&gt;&lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>_ProductCatalogProduct.cshtml</strong></p>
  
  <pre><code>@model BaseProductCatalogPageView
  @using Agathas.Storefront.Controllers.ViewModels.ProductCatalog
  @using Agathas.Storefront.UI.Web.MVC.Helpers
  
  @{
      Layout = "~/Views/Shared/_Layout.cshtml";                  
  }
  
  @if (IsSectionDefined("MenuContent"))
  {
      @RenderSection("MenuContent", required: false)
  }
  else
  {
      @Html.Partial("_Categories", ((BaseProductCatalogPageView)Model).Categories)
  }
  @RenderBody(); 
  </code></pre>
  
  <p><strong>Index.cshtml</strong></p>
  
  <pre><code>@model HomePageView
  @using Agathas.Storefront.Controllers.ViewModels.ProductCatalog
  @using Agathas.Storefront.Services.ViewModels
  @using Agathas.Storefront.UI.Web.MVC.Helpers 
  
  @{ 
      Layout = "~/Views/Shared/_ProductCatalogLayout.cshtml";
      ViewBag.Title = "Home Page";
  }
  
  &lt;img width="559" height="297" 
          src="@Url.Content("~/Content/Images/Products/product-lifestyle.jpg")"
          style="border-width: 0px; padding: 0px; margin: 0px" /&gt;
      &lt;div style="clear: both;"&gt;&lt;/div&gt;
      &lt;h2&gt;Top Products&lt;/h2&gt;
      &lt;div id="items" style="border-width: 1px; padding: 0px; margin: 0px"&gt;
          &lt;ul class="items-list"&gt;
              @foreach (ProductSummaryView product in Model.Products)
              {
                  &lt;li class="item-detail"&gt;
                  &lt;a class="item-productimage-link" href="@Url.Action("Detail", "Product",     new { id = product.Id }, null)"&gt;
              &lt;img class="item-productimage" src="@Url.Content("~/Content/Images/Products/" + product.Id.ToString() +".jpg"))" /&gt;&lt;/a&gt;
              &lt;div class="item-productname"&gt;@Html.ActionLink(product.BrandName + " " + product.Name, "Detail", "Product", new { id = product.Id }, null)&lt;/div&gt;
              &lt;div class="item-price"&gt;@product.Price&lt;/div&gt;
              &lt;/li&gt;
          }
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Many thanks</p>