For all students who wanted a Demo of Saving Attendance in the table. protected void Button1_Click( object sender, EventArgs e) { //ON THE CLICK OF SAVE ATTENDANCE BUTTON DateTime vDt = DateTime .Now; int vRegNo; String vCourseCode; String vSection; String vAttendanceStatus = "" ; for ( int x = 0; x < GridView1.Rows.Count; x++) { vRegNo = Convert .ToInt16(GridView1.Rows[x].Cells[0].Text); vCourseCode = GridView1.Rows[x].Cells[1].Text; vSection = GridView1.Rows[x].Cells[2].Text; DropDownList temp = ( DropDownList )GridView1.Rows[x].Cells[3].FindControl( "mydropdown" ); if (temp.SelectedIndex == 0) { vAttendanceStatus = "P" ; } else if (temp.SelectedIndex == 1) { vAttendanceStatus = &qu