public ActionResult Edit(int id, Student std) { try { StudentRepo repo = new StudentRepo(); repo.EditStudent(std); return(RedirectToAction("Index")); } catch { return(View()); } }