public ActionResult AddDesignation(Designation designation) { int id = 0; if (ModelState.IsValid) { id = objDesignation.InsertUpdateDesignation(designation); //return RedirectToAction("Departmentlist"); } return(Json(id, JsonRequestBehavior.AllowGet)); }