asp.net - Session becoming Null after Response.redirect -
i set 2 sessions fill database:
session("username") = reader.item("user_name").tostring session("department") = reader.item("user_department").tostring
to add restrictions depending on department user signing in (it department, customer service, etc..)
sessions readable form login.aspx form default.aspx
but in other pages:
if session("department")<>"it" response.redirect("login.aspx") end if
this redirects login.aspx , session("department") equals nothing
any idea on why doing so? tried searching missing in code , couldn't find anything.
the key case sensitive, change "department". it's set "department"
Comments
Post a Comment