public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PopUps popUps = popUpManager.Find(x => x.Id == id.Value); if (popUps == null) { return(HttpNotFound()); } return(View(popUps)); }