title: How to Render Partial View into a String
body: <p>I have the following code:</p>
  
  <pre><code>public ActionResult SomeAction()
  {
      return new JsonpResult
      {
          Data = new { Widget = "some partial html for the widget" }
      };
  }
  </code></pre>
  
  <p>I'd like to modify it so that I could have</p>
  
  <pre><code>public ActionResult SomeAction()
  {
      // will render HTML that I can pass to the JSONP result to return.
      var partial = RenderPartial(viewModel); 
      return new JsonpResult
      {
          Data = new { Widget = partial }
      };
  }
  </code></pre>
  
  <p>is this possible? Could somebody explain how?</p>
  
  <p><strong>note</strong>, I edited the question before posting the solution.</p>