protected void btnUpdateEnroll_Click(object sender, EventArgs e) { try { Enrollment mst = new Enrollment(); mst.EnrollmentID = Convert.ToInt32(Request.QueryString["EID"].ToString()); mst.Salary = Convert.ToDecimal(txtsalary.Text.Trim()); mst.Dept_ID = Convert.ToInt32(ddldepartment.SelectedValue.Trim()); mst.TEACHERID = Convert.ToInt32(ddlTeacher.SelectedValue.Trim()); mst.StateID = Convert.ToInt32(ddlstate.SelectedValue.Trim()); Enrollments Teacher = new Enrollments(); String strerr = Teacher.EditEnroll(mst); if (strerr == "0") { Response.Redirect("~/Enroll/EnrollDetails", false); } } catch (Exception ex) { } }