public ActionResult Update(int id) { if (Session["UserSession"] != null) { ViewBag.Designation = _designationManager.GetAllDesignationAsListItem(); ViewBag.IsActives = _designationManager.GetIsActiveListItem(); UserInfoDesignationViewModel userInfoDesignationViewModel = _userInfoManger.GetUserById(id); return(View(userInfoDesignationViewModel)); } else { return(RedirectToAction("Logout", "Home", new { message = "You have already logged out. Please login again" })); } }