title: Asp.Net MVC - Trying to get Html.RenderAction to work
body: <p>So I've been trying to figure out a way to use a Model called Posts in my layout for a few days now, and a solution (that would be perfect if it worked for me) was:</p>
  
  <pre><code>@Html.RenderAction()
  </code></pre>
  
  <p>Which gave me an error of:</p>
  
  <blockquote>
    <p>'IHtmlHelper>' does not contain a definition for 'RenderAction' and no extension method 'RenderAction' accepting a first argument of type 'IHtmlHelper>' could be found (are you missing a using directive or an assembly reference?)</p>
  </blockquote>
  
  <p>I've tried fixing it the error by adding the following to the web.config file, but it doesn't change a thing,</p>
  
  <pre><code>&lt;system.web&gt;
    &lt;pages&gt;
      &lt;namespaces&gt;
        &lt;add namespace="System.Web.Mvc"/&gt;
        &lt;add namespace="System.Web.Mvc.Html"/&gt;
      &lt;/namespaces&gt;
    &lt;/pages&gt;
  &lt;/system.web&gt;
  </code></pre>
  
  <p>trying <code>using System.Web</code> doesn't do anything because the namespace "Web" doesn't exist in  "System".</p>
  
  <p>Is there anything I can change to use the Html.RenderAction() method?</p>