title: Set a page title from a PartialView
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="http://stackoverflow.com/questions/4974027/modifying-mvc-3-viewbag-in-a-partial-view-does-not-persist-to-the-layout-cshtml">Modifying MVC 3 ViewBag in a partial view does not persist to the _Layout.cshtml</a>  </p>
  </blockquote>
  
  
  
  <p>I'm trying to set a pageTitle from a PartialView</p>
  
  <p>Here is my code: </p>
  
  <p><strong>PartialView template:</strong></p>
  
  <pre><code>@{
      ((WebViewPage)WebPageContext.Current.Page).ViewBag.Title = "Page title";
  }
  </code></pre>
  
  <p><strong>_Layout.cshtml:</strong></p>
  
  <pre><code>&lt;title&gt; @ViewBag.Title&lt;/title&gt;
  </code></pre>
  
  <p>How to do this?</p>