Before use session checked that exists or not if not then redirect ur page to Login page
if Session["userName"] == null then response.redire ct('');
I have to record the logout time also. bt this code will not work it only to redirect to another page. becoze when the session expires then how i got the value that which user is logged in n how we record their time of logout in database
my problem is that after every 20minutes i got the error that the Object reference not set to an instance of an object.
and highlight the line lblWelcome.Text = "Welcome, " + Session["userName"].ToString();
I want that when the session expires either user will see LogIn page or the sesion resume their values.
Where i write the code for the above.... thanks for your code in advance
Leave a comment: