public ActionResult Edit(MVCDemoNew.Entity.Student stud) { string msg; bool hasError = student.Update(stud, out msg); return(Json(new { Error = hasError }, JsonRequestBehavior.AllowGet)); }
public ActionResult Save(MVCDemoNew.Entity.Student stud) { string msg; if (ModelState.IsValid) { bool hasError = student.Save(stud, out msg); return(Json(new { Error = hasError }, JsonRequestBehavior.AllowGet)); } else { return(View()); } }