The code is given below public ActionResult Index() { string a = Session["userStatus"].ToString(); //Here the error occured if (a!=null) { if (Session["userStatus"].ToString() == "2") { return Redirect("/EditUserProfile"); } } return View("ActsRules"); }
if (Session["userStatus"]!=null) { if (Session["userStatus"].ToString() == "2") { return Redirect("/EditUserProfile"); } }
public ActionResult Index() { string a = "2"; Session["userstatus"] = a; if (a!=null) { if (Session["userStatus"].ToString() == "2") { return Redirect("/EditUserProfile"); } } return View("ActsRules"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)