// GET: DoctorsView/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Doctores_More_Details more = db.Doctores_More_Details.Find(id); if (more == null) { return(HttpNotFound()); } return(View(more)); }
public ActionResult search(int?id) { //var errMsg = TempData["ErrorMessage"] as string; if (id == null) { new HttpNotFoundResult("Please enter Id"); // Response.AddHeader("REFRESH", "5;URL=Index"); // return RedirectToAction("Index"); } Doctores_More_Details SearchView = db.Doctores_More_Details.Find(id); if (SearchView == null) { TempData["ErrorMessage"] = "PATIENT NOT FOUND !!!"; return(RedirectToAction("Index")); } return(View(SearchView)); }