title: ASP.NET MVC two of 'the same' controller actions returning different views for different purposes
body: <p>I have two controller actions, where one is used to return the view in a standard way and another returns a large chunk of the same view for use in, for example, a javascript modal somewhere else in my application. My question is what would be the best practise way to do this, or if the way I have done it is ok. Maybe I should move the duplicated code out to a helper method?</p>
  
  <p>(Note the Create View has the _Create partial inside it)</p>
  
  <p>Right now I have:</p>
  
  <pre><code>public ActionResult Create(int someParamater)
  {
      //Lots of code 
      return View(model);
  }
  
  public PartialViewResult GetCreatePartial(int someParameter)
  {
      //All of the same code as in Create
       return PartialView("_Create", model);
  }
  </code></pre>