public ActionResult Create() { if (Session["LogedUserID"] != null) { try { var speciality = db.SP_SelectSpeciality(); return(View(speciality)); } catch (Exception ex) { ViewBag.errorMessage = "Error occurred while loading data."; return(View()); } } else { return(RedirectToAction("AdminLogin", "Account")); } }