public ActionResult Edit(int?id) { string result = ""; try { EmployeeInfo objEmployeeInfo = new EmployeeInfo(); objEmployeeInfo = objAccessDB.GetUserByUserId(id); return(Json(new { data = objEmployeeInfo }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(new { data = result }, JsonRequestBehavior.AllowGet)); } }