public ActionResult Admin() { mvcTestingDB mvcDB = new mvcTestingDB(); mvcTestingModel mvcModel = new mvcTestingModel(); //Session["login"] = ""; Session.Remove("login"); Session.Remove("Adminlogin"); mvcModel.adminDropDown = mvcDB.getAdminDropDownList(); return View(mvcModel); }
public ActionResult AddNewAdmin() { mvcTestingDB mvcDB = new mvcTestingDB(); mvcTestingModel mvcModel = new mvcTestingModel(); string AdminLogin = Session["Adminlogin"].ToString(); if (AdminLogin != "") { mvcModel.NewAdCategory = mvcDB.getAdminDropDownList(); } else { return RedirectToAction("ErrorPage"); } return View(mvcModel); }