Adding Records to Table from Template Field Checkbox selection and Gridview Boundfield
<p>I am currently building a Attendance Register System in ASP.Net using C#.
The system has a database including these Sql tables;</p>

<pre><code>Attendance Table
AttendanceID
Present (boolean type)
StudentID

Student Table
StudentID
StudentName
CourseID

Course Table
CourseID
CourseName
</code></pre>

<p>I have populated a dropdownlist with the Course Table and based on the selected <code>CourseID</code> in the dropdownlist a gridview is populated from the student table where the <code>studentID</code> and <code>StudentName</code> is displayed with the same <code>CourseID</code> that is selected in the dropdownlist. This works fine. </p>

<p>The Attendance Table does not contain any records untill the register has been taken and records are added.</p>

<p>Now for the tricky bit, the gridivew displays all the <code>StudentID</code> which have the same <code>CourseID</code> based on the <code>CourseID</code> selected in the dropdownlist. The gridview also has a template field with a checkbox, this allows the user to check the checkbox if the student is present.</p>

<p>There is a <code>SaveAttendance</code> Button on the page. Once the user clicks the <code>SaveAttendance</code> button, I want to add all the <code>StudentID</code>'s displayed in the gridview along with adding the status of the checkboxes (weather they are checked or not) into the Attendance table  fields <code>StudentID</code> and Present respectively. 
Need help as soon as possible, any help is much appreciated. Thanks!</p>
