title: How to use Ajax to update RenderBody() section with VS 2012 Internet Template?
body: <p>I've looked at few examples where Ajax can be used to update divs or other elements with ids. I have not been able to find an example that uses Ajax with Razor views to help me with the following.</p>
  
  <p>My page is a standard Menu at the top, body in the middle, and a footer. There is no real need to update the header and footer each time. In fact, my page only requires a section of the Body to be updated based on menu clicks and actionlinks on the page. I'm testing this with the Internet Template that is created using VS 2012 if that helps such that I do not have to clutter this request with a bunch of code snippets. I am using Razor views and C# for coding preferences.</p>
  
  <p>So, given the default _Layout.cshtml file, how would I load the About page i.e. RenderBody() section via Ajax? I've tried adding Ajax.BeginForm(...) to my _Layout.cshtml file around one div with an UpdateTargetId that matches a div that I wrapped around the RenderBody() call, returned a partial view from my controller, but that's not quite right. What I get is my partial view only. (The About page with no menu, footer, etc. just the code on the About page)</p>
  
  <p>Would someone kindly share a link that demonstrates this functionality or kindly share the code that does what I desire i.e. swap index view with about view without a full page refresh? Some explanation of what I'm missing would be nice, but I'm sure I could deduce from a solid example where I went awry. As always, your time is much appreciated.</p>
  
  <p>EDIT: Using Jasen's suggestion
  _Layout.cshtml</p>
  
  <pre><code>&lt;nav&gt;
      &lt;ul id="menu"&gt;
         &lt;li&gt;@Html.ActionLink("Home", "Index", "Home")&lt;/li&gt;
         &lt;li&gt;@Ajax.ActionLink("About", "About", "Home", null, new AjaxOptions { HttpMethod = "get", UpdateTargetId = "body" }, new { })&lt;/li&gt;
         &lt;li&gt;@Html.ActionLink("Contact", "Contact", "Home")&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/nav&gt;
  </code></pre>
  
  <p>....</p>
  
  <p>Inside my div id="body"</p>
  
  <pre><code>@RenderSection("featured", required: false)
  &lt;section class="content-wrapper main-content clear-fix"&gt;
      @RenderBody()
  &lt;/section&gt;
  </code></pre>
  
  <p>.....
  HomeController.cs</p>
  
  <pre><code>public ActionResult About()
  {
      ViewBag.Message = "Your app description page.";
  
      return PartialView();
  }
  </code></pre>
  
  <p>......</p>