title: The parameter conversion from type 'System.String' to type 'T' failed because no type converter can convert between these types
body: <p><strong>NOTE</strong>: All of the code here is paraphrased as an example, as I can't show real code.</p>
  
  <p>I have a view model class that looks something like</p>
  
  <pre><code>public SearchViewModel
  {
     public string Term
     {
       get; set;
     }
  
     public SearchResult Result
     {
       get; set;
     }
  
     public List&lt;Filter&gt; Filters
     {
       get; set;
     }
  }
  </code></pre>
  
  <p>This is bound to a regular controller and everything works fine:</p>
  
  <pre><code> public ActionResult Search (SearchViewModel model)
   {
        if (ModelState.IsValid)
        {
             model.Result = _searchService.Search(model.Term);
             return View(model);
        }
   }
  </code></pre>
  
  <p>I also have another action that handles taking in a POST from a form that contains checkboxes. This controller handles creating Filter classes and redirects to the Search action.</p>
  
  <p>Something like:</p>
  
  <pre><code>    public ActionResult Filter(FormCollection formParams)
      {
          return RedirectToAction("Search", new SearchViewModel
          {
              Term = formParams["Term"],
              Filters = 
                  formParams.Keys
                      .Cast&lt;String&gt;()
                      .Where(k =&gt; k.Contains("filter"))
                      .Select(k =&gt; Filter.Build(k, formParams[k]))
                      .ToList()                        
          });                                        
      }
  </code></pre>
  
  <p>This passes a ViewModel with the List collection populated back to the Search action.</p>
  
  <p>However, in the search action, ModelState.IsValid now returns false. This is because the model binder throws this exception:</p>
  
  <blockquote>
    <p>The parameter conversion from type
    'System.String' to type 'Filter'
    failed because no type converter can
    convert between these types.</p>
  </blockquote>
  
  <p>Looking at the raw value in ModelState for "Filters" shows that is a string:</p>
  
  <pre><code>   System.Collections.Generic.List`1[Filter]
  </code></pre>
  
  <p>It seems like the actual contents of the List is lost during the transition between actions, likely because it only called ToString() on the property members.</p>
  
  <p>At this point, I have a vague idea of why this is failing, and I figure I could write a custom model binder or type converters to make it work, however, I have a feeling that this approach smells, and this is probably something that is trivial, I'm just approaching it wrong.</p>
  
  <p>So, what is the proper ASP.NET MVC 3 to pass a collection of complex types from one action to another?</p>