title: asp.net mvc fill viewModel from FormCollection
body: <p>I have a lot of similar ViewModel:</p>
  
  <pre><code>public class RequestForSalaryVM : StatementViewModel
  {
    // RequestForSalaryVM properties
  }
  
  public class ReliefVM : StatementViewModel
  {
    // ReliefVM properties
  }
  </code></pre>
  
  <p>and a lot of similar methods:</p>
  
  <pre><code>[HttpPost]
  public ActionResult SaveRelief(User currentUser, ReliefVM statement)
  {
      ReliefVM model = (ReliefVM)SaveModel(currentUser, statement);
      if (model == null)
          return RedirectToAction("List");
      return View("Relief", model);
  }
  
  [HttpPost]
  public ActionResult SaveRequestForSalary(User currentUser, RequestForSalaryVM statement)
  {
      RequestForSalaryVM model = (RequestForSalaryVM)SaveModel(currentUser, statement);
      if (model == null)
          return RedirectToAction("List");
      return View("RequestForSalary", model);
  }
  </code></pre>
  
  <p>I want to get something like this:</p>
  
  <pre><code>[HttpPost]
  public ActionResult SaveStatement(User currentUser, FormCollection statement, string ViewModelName)
  {
    Assembly assembly = typeof(SomeKnownType).Assembly;
    Type type = assembly.GetType(ViewModelName);
    object ViewModel = Activator.CreateInstance(type);
  
    //Fill ViewModel from FormCollection  &lt;= how can I use asp.net mvc binding for this?
    //I do not want to create their own implementation of asp.net mvc binding 
      return View(ViewModelName, ViewModel);
  }
  </code></pre>