title: ASP.NET - Array from Checkbox Post
body: <p>I'm trying to parse posted checkbox's into an array variable in csharp. Example:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> &lt;input type="checkbox" name="ID[]" value="1" /&gt;
   &lt;input type="checkbox" name="ID[]" value="2" /&gt;
   &lt;input type="checkbox" name="ID[]" value="3" /&gt;
   &lt;input type="checkbox" name="ID[]" value="4" /&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>That will be parsed from Request into something like this: </p>
  
  <pre><code>int[] IDs = new int[] { 1, 2, 3, 4 };
  </code></pre>