title: How to pass Int Array from Razor to Controller in MVC
body: <p>I want to to pass an array of <code>int</code> from <code>Razor</code> view to controller </p>
  
  <p>I tried this it gave me one line "1","2" not two items </p>
  
  <pre><code>    public List&lt;int&gt; SelectedIDs { get; set; }
  
       @Html.HiddenFor(model =&gt; model.SelectedIDs, new { id = "hid" })
  
       $('#document').submit(function () {
  
          $("#hid").val($('#dropdownOne').val());
  
        });
  </code></pre>