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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -