title: How to insert "File1.cshtml" into a section in main view
body: <p>Ok, im probably doing this wrong... But in my main _Layout I have this:</p>
  
  <pre><code>&lt;div id="navigation"&gt;
              @RenderSection("Navigation")
          &lt;/div&gt;
  </code></pre>
  
  <p>which points to this in my Index.cshtml view:</p>
  
  <pre><code>@section Navigation{
    &lt;-- Need this to point to Views/Shared/Navigation.cshtml --&gt;
  }
  </code></pre>
  
  <p>But I don't want to have a huge file with all my code in it, so I need to know how to point to a file called "Navigation.cshtml" inside of this section - basically so I have all my sections in separate, independent files.</p>
  
  <p>I tried just doing @RenderPage("Navigation.cshtml") in the _Layout instead of @RenderSection, and that gives errors.</p>
  
  <p>--EDIT--</p>
  
  <p>If I add this instead of @RenderSection()</p>
  
  <pre><code>&lt;div id="navigation"&gt;
            = @RenderPage("~Views/Shared/Navigation.cshtml")
          &lt;/div&gt;
  </code></pre>
  
  <p>I get this:</p>
  
  <pre><code>The file "~/Views/Shared/~Views/Shared/Navigation.cshtml" could not be rendered, because it does not exist or is not a valid page.
  </code></pre>
  
  <p>--EDIT--</p>
  
  <p>FULL _Layout.cshtml:</p>
  
  <pre><code>   &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;@ViewBag.Title&lt;/title&gt;
  &lt;link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /&gt;
  &lt;script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"&gt;    &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;div id="wrapper"&gt;
  
      &lt;div id="content"&gt;
          &lt;!-- BANNER --&gt;
          &lt;div id="banner"&gt;
  
          &lt;/div&gt;
          &lt;!-- NAVIGATION --&gt;
          &lt;div id="navigation"&gt;
           @RenderPage("Navigation.cshtml")
          &lt;/div&gt;
          &lt;!-- MAIN DISPLAY --&gt;
          &lt;div id="main"&gt;
              @RenderBody()
          &lt;/div&gt;
          &lt;!-- FOOTER --&gt;
          &lt;div id="footer"&gt;
  
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>
  </p>