title: Pass lists of selected relevant hidden field values form to the controller
body: <p>Can anyone please tell me how do I pass lists of selected relevant hidden field values from to controller. The assigned field return value is Boolean(true). There are over 100 list items. If admin person select(Assigned) list and submit, it'll pass all list values pass to the controller and update database.   </p>
  
  <p>This my view page chtml code:</p>
  
  <pre><code>@using (Html.BeginForm("CAssigned", "Orders", FormMethod.Post, new { enctype = "multipart/form-data" }))
  {
      @foreach (var item in Model)
      {
          @Html.HiddenFor(model =&gt; item.LocationId)
          &lt;td&gt;
              @Html.DisplayFor(modelItem =&gt; item.MapIcons)
              @Html.HiddenFor(model =&gt; item.MapIcons,"MapIcons")
          &lt;/td&gt;
          &lt;td&gt;
              @Html.EditorFor(modelItem =&gt; item.Assigned)
              @Html.HiddenFor(model =&gt; item.Assigned)
          &lt;/td&gt;
      } 
      &lt;input type="Submit" value="Select" /&gt;
  }
  </code></pre>
  
  <p>My controller</p>
  
  <pre><code>   [HttpGet]
      public ActionResult CAssigned()
      {
          var orders = db.Locations.ToList();
          return View(orders);
      }
  
      [HttpPost] 
     public ActionResult CAssigned(IEnumerable&lt;Location&gt;) 
      {
      return View();
      }
  </code></pre>
  
  <p>html view source
  </p>
  
  <pre><code>&lt;input data-val="true" data-val-number="The field LocationId must be a number." data-val-required="The LocationId field is required." id="item_LocationId" name="item.LocationId" type="hidden" value="1" /&gt;
  &lt;td&gt;
      red-dot.png
      &lt;input Length="8" id="item_MapIcons" name="item.MapIcons" type="hidden" value="red-dot.png" /&gt;&lt;/td&gt;
  &lt;td&gt;
  &lt;input class="check-box" data-val="true" data-val-required="The Assigned to Courier field is required." id="item_Assigned" name="item.Assigned" type="checkbox" value="true" /&gt;&lt;input name="item.Assigned" type="hidden" value="false" /&gt;
  &lt;input type="Submit" value="Select" /&gt;
  &lt;input id="item_Assigned" name="item.Assigned" type="hidden" value="False" /&gt;
  &lt;td&gt;
  </code></pre>