public ActionResult ViewOtherUserDetailsPartial(string acctno) { string msg; try { var model = _secretSantaBl.CustomUserDetailsEditModelByAcctNo(acctno); return(PartialView("_ViewEditUserDetails", model)); } catch (Exception ex) { ModelState.AddModelError("", ex.Message); msg = "Error has occured"; } return(PartialView("_ErrorMessage", new StringModel(msg))); }