title: ASP.NET MVC parameter binding: How to POST a list or array to a controller method?
body: <p>I can't seem to figure out how to pass an array of GUIDs as a parameter to a ASP.NET MVC controller via POST.  What am I missing?  Is there a simpler way to do this?</p>
  
  <p>In my AngularJS markup:</p>
  
  <pre><code>&lt;form method="post" action="/Foo/Bar" &gt;
    &lt;input name="itemIds" type="hidden" value="{{ ctrl.itemIds }}"&gt;
    &lt;button type="submit"&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Which results in HTML:</p>
  
  <pre><code>&lt;form method="post" action="/Foo/Bar" &gt;
    &lt;input name="itemIds" type="hidden" value="[&amp;quot;8cd52539-c371-402a-b8be-12775f03ab68&amp;quot;,&amp;quot;8c97f9e0-666c-41ba-a914-72815745d1f0&amp;quot;]"&gt;
    &lt;button type="submit"&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>In my FooController:</p>
  
  <pre><code>[System.Web.Mvc.HttpPost]
  public ActionResult Bar([FromBody]Guid[] itemIds) =&gt; ...
  </code></pre>
  
  <p>When I debug the above, my HTTP POST seems to be correct but I get null <code>itemIds</code> in <code>Bar</code>.  Can you help me change this to work?  Is there a better way to populate my request body, given that I already have an array of GUIDs in my JS model?</p>