title: Returning a rendered HTML partial in a JSON Property in ASP.NET MVC
body: <p>I've been happily returning JsonResult objects or partial ASP.NET views from my controllers in ASP.NET.</p>
  
  <p>I would like to return a rendered partial view as a property in a JSON object.  e.g.</p>
  
  <p>requesting </p>
  
  <pre><code>/post/detail/1
  </code></pre>
  
  <p>would return </p>
  
  <pre><code>{"PostId": 1, "Html": "&lt;p&gt;some markup rendered from a partial to inject&lt;/p&gt;" }
  </code></pre>
  
  <p>This would allow me to know the PostId when I am handling the response in JavaScript.  Any tips on the best way to do this?</p>