title: ASP.net MVC posts int-array
body: <p>Imagine this formular.
  (I edited the form, to show what I am trying to do.)</p>
  
  <pre><code>@using (Html.BeginForm("Add", "Notify", FormMethod.Post ))
  {
     @foreach (KeyValuePair&lt;Server, Services[]&gt; server in ViewBag.ServerServices)
                          {
                              &lt;div class="panel panel-default"&gt;
                                  &lt;div class="panel-heading" role="tab" id="heading_@server.Key.ServerID"&gt;
                                      &lt;h4 class="panel-title"&gt;
                                          &lt;a role="button" data-toggle="collapse" data-parent="#accordion" href="#@server.Key.ServerID" aria-expanded="false" aria-controls="@server.Key.ServerID"&gt;
                                              @server.Key.Servername
                                          &lt;/a&gt;
                                      &lt;/h4&gt;
                                  &lt;/div&gt;
                                  &lt;div id="@server.Key.ServerID" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading_@server.Key.ServerID"&gt;
                                      @foreach (Services service in server.Value)
                                      {
                                          &lt;input class="form-control" type="checkbox" name="selectedServerServices[@server.Key.ServerID]" value="@service.ServiceID"/&gt;&lt;label&gt;@service.ServiceName&lt;/label&gt;
                                          &lt;br/&gt;
                                      }
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          }
  </code></pre>
  
  <p>I would like to get the posted values and the keys too, 
  but I always get a null object when trying to retrieve both.</p>
  
  <p>In Request.AllKeys I can see that there are two values (e.g.)
  But the posted values do not get into the defined dictionary </p>
  
  <p>My Action method looks like this.</p>
  
  <pre><code>    public ActionResult Add(Dictionary&lt;string, int&gt; test )
  </code></pre>