title: List of Checkbox returns false even when checked in asp.net core razor pages
body: <p>Student Attendance class</p>
  <pre><code> public class StudentAttendance
  {
      public int Id { get; set; }
      public int StudentID { get; set; }
      public bool IsPresent { get; set; }
  
  }
  </code></pre>
  <p>View table for my attendance form</p>
  <pre><code> @foreach (var student in Model.Students)
            {
              &lt;tr&gt;
                  &lt;td&gt; @student.FullName&lt;/td&gt;
                  &lt;td&gt;&lt;input type=&quot;hidden&quot; asp-for=&quot;HiddenID&quot; id=&quot;id&quot; value=&quot;@student.StudentID&quot;/&gt;&lt;/td&gt;
                  &lt;td &gt;&lt;label class=&quot;col-form-label&quot;&gt;&lt;input type=&quot;checkbox&quot; name=&quot;IsPresent&quot; &gt;&lt;/label&gt;&lt;/td&gt; &lt;/tr&gt; }
  </code></pre>
  <p>Attendance Page Model</p>
  <pre><code> [BindProperty]
      public StudentAttendance studentAttendance { get; set; }
  
      [BindProperty]
      public List&lt;int&gt; StudentAttendanceList { get; set; }
  
      [BindProperty(SupportsGet = true)]
      public int? SearchClassID { get; set; }
  
  
      [BindProperty]
      public List&lt;int&gt; HiddenID { get; set; }
  
      [BindProperty]
      public bool IsPresent { get; set; }
  
  
      public IEnumerable&lt;Student&gt; Students { get; set; }
  </code></pre>
  <p>Attenadance On Post()</p>
  <pre><code>foreach (var id in HiddenID)
          {
              Conn.StudentAttendance.Add(new StudentAttendance
              {
                  StudentID = id,
                  IsPresent = IsPresent,
              });
          }
  </code></pre>
  <p>When i submit and save the IsPresent value remains false even when checked</p>