title: Passing an array or list of strings from one action to another when redirecting
body: <p>I have a post action Import:</p>
  
  <pre><code>public ActionResult Import()
  {
      var fileNames = new List&lt;String&gt;();
  
      foreach (string path in Directory.GetFiles(directoryPath))
      {
          //do a whole bunch of stuff
          ...
          fileNames.Add(path.Split('\\').Last());            
      }
  
      return RedirectToAction("Index", new { InvalidFiles = fileNames });
  }
  </code></pre>
  
  <p>As you can see, it redirects to an <code>Index</code> action, passing the <code>List&lt;String&gt;</code> of file names</p>
  
  <pre><code>public ActionResult Index(List&lt;String&gt; InvalidFiles)
  {
      return View();
  }
  </code></pre>
  
  <p>In the <code>Index</code> action, the List comes in with the right amount of elements, however all the actual strings has been changed from the filename to the string "System.Collections.Generic.List`1[System.String]".</p>
  
  <p>Any idea why this is happening?  Is there a better way to pass the list to the new action, possibly using TempData?</p>