public ActionResult UpdateDepartmentInfo(DepartMentWithDeptName model) { try { if (ModelState.IsValid) { int id = updateOperation.DepartmentInfoUpdate(model); if (id > 0) { ModelState.Clear(); ViewBag.Success = "Successfully Updated!"; } else { ViewBag.Success = "Failed!"; } } return(RedirectToAction("Studentslist", "ShowDetails")); } catch (Exception ex) { return(View(ex)); } }