title: Asp-action edit not getting the data from razor page
body: <p>Im trying to submit a form that consist of checkboxes.
  When I submit the form I don't get the selected data from the form. I have been trying to use asp-for but I don't understand what I'm doing wrong.</p>
  
  <p>this is my razor page:</p>
  
  <pre><code>@model TheaterReservering.Models.KlantReservering
  
  @{
      ViewData["Title"] = "Edit";
  }
  
  &lt;h1&gt;Edit&lt;/h1&gt;
  
  &lt;h4&gt;Reservering voor: @Model.Klant.Naam&lt;/h4&gt;
  
  &lt;form asp-action="Edit"&gt;
      &lt;input type="hidden" asp-for="Klant" /&gt;
      &lt;table class="table"&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;
                      1
                  &lt;/th&gt;
                  &lt;th&gt;
                      2
                  &lt;/th&gt;
                  &lt;th&gt;
                      3
                  &lt;/th&gt;
                  &lt;th&gt;
                      4
                  &lt;/th&gt;
                  &lt;th&gt;
                      5
                  &lt;/th&gt;
                  &lt;th&gt;
                      6
                  &lt;/th&gt;
                  &lt;th&gt;&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
              @{
                  var count = 0;
              }
              @foreach (var item in Model.Reserveringen)
              {
                  if ((count % 6) == 0)
                  {
                      @:&lt;tr&gt;
                      }
  
                      &lt;td style="text-align:center; vertical-align:middle"&gt;
                          &lt;div class="form-group"&gt;
                              @if (item.KlantId == Model.Klant.Id)
                              {
                                  &lt;input type="checkbox" asp-for="Reserveringen.ElementAt(count).Bezet" checked /&gt;
                                  &lt;br /&gt;
                                  &lt;div style="background-color: blue; text-align: center"&gt;
                                      &lt;label style="color:white" asp-for="@item.Naam"&gt;@item.Naam&lt;/label&gt;
                                  &lt;/div&gt;
                              }
                              else if (item.KlantId == null)
                              {
                                  &lt;input type="checkbox" asp-for="Reserveringen.ElementAt(count).Bezet" /&gt;
                                  &lt;br /&gt;
                                  &lt;div style="background-color: green; text-align: center"&gt;
                                      &lt;label style="color:white" asp-for="@item.Naam"&gt;@item.Naam&lt;/label&gt;
                                  &lt;/div&gt;
                              }
                              else
                              {
                                  &lt;input type="checkbox" checked disabled /&gt;
                                  &lt;br /&gt;
                                  &lt;div style=" background-color: red; text-align: center"&gt;
                                      &lt;label style="color:white" asp-for="@item.Naam"&gt;@item.Naam&lt;/label&gt;
                                  &lt;/div&gt;
                              }
                          &lt;/div&gt;
                      &lt;/td&gt;
  
                      if ((count % 6) == 5)
                      {
                      @:&lt;/tr&gt;
                  }
                  count++;
              }
          &lt;/tbody&gt;
  
      &lt;/table&gt;
      &lt;div class="form-group"&gt;
          &lt;input type="submit" value="Reserveringen vastleggen" class="btn btn-primary" /&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>My controller methode:</p>
  
  <pre><code>        [HttpPost]
          [ValidateAntiForgeryToken]
          public async Task&lt;IActionResult&gt; Edit(int id, [Bind("Klant,Reserveringen")] KlantReservering klantReservering)
          {
              if (id != klantReservering.Klant.Id)
              {
                  return NotFound();
              }
  
              if (ModelState.IsValid)
              {
  
                  _context.Update(klantReservering);
                  await _context.SaveChangesAsync();
  
  
                  return RedirectToAction(nameof(Index));
              }
              return View(klantReservering);
          }
  </code></pre>
  
  <p>and this is the class i created to combine the class Klant with Reservering.</p>
  
  <pre><code>    public class KlantReservering
      {
          public Klant Klant { get; set; }
          public List&lt;Reservering&gt; Reserveringen { get; set; }
      }
  }
  
  </code></pre>