title: How do I insert a partial view in a View at a certain place in the view with MVC3?
body: <p>I have an MVC3 application that I am implementing <a href="https://github.com/defunkt/jquery-pjax#readme" rel="nofollow">pjax</a> into .  Everything is working well except what to do on the server side when an address gets loaded that doesn't already have the main view on the client side.  My Controller code looks like</p>
  
  <pre><code>public virtual ActionResult Details(Guid id)
      {
          var partDetail = new PartDetail(id);
          var partialView = PartialView("Details", partDetail);
          if(Request.Headers["X-PJAX"]!= null)
          {
              return partialView;
          }
  
          var mainView =  View("Index");
          // Stick Partial View into main view at #update_panel?
          return mainView;
      }
  </code></pre>
  
  <p>How can I stick the partial View into the main view so it inserts the partial view in the  #update_panel?</p>