title: how to post the choices i check or uncheck in my checkbox
body: <p>i want to Edit the box i check or uncheck of my checkbox in the Post controller. This is my code in my Get and in my Cshtml</p>
  
  <pre><code>var assignedStudentBadges = db.Enrolled_Students_Badges.Where(x =&gt; x.CohortSubscriptionId == id);
              var badges = db.Badges;
              var studentBadges = new List&lt;StudentBadgesViewModel&gt;();
              foreach (var badge in badges)
              {
                  var isChecked = assignedStudentBadges.Any(b =&gt; b.ID == badge.ID) ? "checked" : null;
                  studentBadges.Add(new StudentBadgesViewModel
                  {
                      BadgeId = badge.ID,
                      Name = badge.Label,
                      ImageURL = badge.ImageURL,
                      IsChecked = isChecked
                  });
              }
              ViewBag.StudentBadges = studentBadges;
              ViewBag.Badges = new SelectList(assignedStudentBadges, "ID", "Label", cohortSubscriptions.Badges);
  
  
  &lt;div class=""&gt;
                                  @{ foreach (var badge in ViewBag.StudentBadges)
                                      {
                                          &lt;div class="col-md-12"&gt;
                                              &lt;img src="@badge.ImageURL" width="80" alt="img-fluid" /&gt;
                                              @badge.Name
                                              &lt;input type="checkbox" checked="@badge.IsChecked" id="@badge.BadgeId" /&gt;
  
                                          &lt;/div&gt;
                                      }
                                  }
                              &lt;/div&gt;
  </code></pre>