A
Abraham Luna
i have a problem when i set a session variable on the login page. sometimes
when i try to access it later it is null.
this is how my login page works:
Session["Typ"] = drEmployee["Typ"].ToString(); //set the typ session
variable to employee typ. either: sales, admin, etc.
FormsAuthentication.SetAuthCookie(tbEmpId.Text, false);
Response.Redirect(Request.QueryString["ReturnUrl"] != null ?
Request.QueryString["ReturnUrl"].ToString() : "secure/" + (Session["Typ"] ==
"Admin" ? "admin/" : "") + "index.aspx");
later on this code will fail:
string strTyp = Session["Typ"].ToString();
does anyone have any solutions. is there a setting or something i forgot to
set?
when i try to access it later it is null.
this is how my login page works:
Session["Typ"] = drEmployee["Typ"].ToString(); //set the typ session
variable to employee typ. either: sales, admin, etc.
FormsAuthentication.SetAuthCookie(tbEmpId.Text, false);
Response.Redirect(Request.QueryString["ReturnUrl"] != null ?
Request.QueryString["ReturnUrl"].ToString() : "secure/" + (Session["Typ"] ==
"Admin" ? "admin/" : "") + "index.aspx");
later on this code will fail:
string strTyp = Session["Typ"].ToString();
does anyone have any solutions. is there a setting or something i forgot to
set?