protected void btnSave_Click(object sender, EventArgs e) { //if (cmbGroup.SelectedValue == "" || cmbGroup.SelectedValue == "0") //{ // RequiredFieldValidator1.IsValid = false; //} //if (lstAsg.Items.Count <= 0) //{ // RequiredFieldValidator2.IsValid = false; //} //save if (Page.IsValid) { var user = Page.User as CustomPrincipal; if (user != null) { //List<int> stdList = new List<int>(); //foreach (ListItem item in lstAsg.Items) //{ // stdList.Add(Convert.ToInt32(item.Value)); //} //if (stdList.Count > 0) //{ using (var helper = new DbHelper.Classes()) { //var s = helper.AssignStudentToGroup(stdList, grpId, Values.ViewState.GetUser(ViewState)); //if (s) //{ // Response.Redirect("~/Views/Student/StudentGroup/List.aspx"); //} var savesuccess = helper.AddOrUpdateUsersList(GetSubjectSessionUsersList()); Response.Redirect("~/Views/Class/CourseClassDetail.aspx?ccId=" + SubjectSessionId); } //} } } }