title: Correct way to write an ASP.NET MVC action returning a PartialViewResult
body: <p>I have written an Action method for an ASP.NET MVC controller, which is being used to provide a model to a usercontrol. </p>
  
  <p>public class ProductsController : Controller
      {</p>
  
  <pre><code>    public PartialViewResult ProductSummary()
      {
          ViewData.Model = new ProductSummaryModel("42"); // dummy data for now
  
          return new PartialViewResult()
          {
              ViewData = ViewData
          };
      }
  }
  </code></pre>
  
  <p>I am using the 'futures' <code>Microsoft.Web.Mvc</code> dll and rendering the control in my main view like this :</p>
  
  <pre><code>&lt;% Html.RenderAction&lt;ProductsController&gt;(x =&gt; x.ProductSummary()); %&gt;
  </code></pre>
  
  <p>What I have here appears to work just fine, but i attempted to google <a href="http://www.google.com/search?hl=en&amp;q=%22new+PartialViewResult%22" rel="nofollow noreferrer"><code>new PartialResult()</code></a> to see if what I was doing was following the correct patterns.</p>
  
  <p>Currently this search only comes up with 4 results!  </p>
  
  <p>So I figured I'm doing somethin wrong here in my controller. Whats the correct way to create an action method that returns a partial view? And what (if anything) is wrong or bad about what I'm doing.</p>