public JsonResult GetEmployeeInfo(string id) { try { Employee e = manager.GetEmployee(int.Parse(id)); if (e != null) { return(Json(e, JsonRequestBehavior.AllowGet)); } } catch (Exception ex) { } return(Json(new { error = true, message = "No data for employee found." }, JsonRequestBehavior.AllowGet)); }