public ActionResult Delete(int?id) { string result = ""; try { bool IsDeleted = false; IsDeleted = objAccessDB.Delete(id); return(Json(new { data = IsDeleted }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(new { data = result }, JsonRequestBehavior.AllowGet)); } }