protected void cfmSubmit_Click(object sender, EventArgs e) { string userID = (string)Request.QueryString["id"]; List <int> suggestedCourseIDList = (List <int>)Session["suggestedCourseIDList"]; Course_elearnDAO ceDAO = new Course_elearnDAO(); //delete all existing suggested courses ceDAO.deleteSuggestedCoursesByUserID(userID); //insert new suggested courses foreach (int id in suggestedCourseIDList) { ceDAO.insertSuggestedCourses(id, userID); } //to change redirect path Response.Redirect("progressReports.aspx?id=" + userID); }