• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 256
  • Last Modified:

Redirect a User when the Session Expires

Guys, I need to Redirect a User when the Session Expires to the Login Page,
Only when the session timesout or expires......the user is directed back to the Login Page

Simple as it seems in theory, its not in real, I need help

  • 2
1 Solution
if suppose your Login Username is saved in a session variable UserName then check it like this

if session("UserName")="" then
end if

add this at the beginning of the page.
That probly wouldnt work would it, because surly you will always have a session, but you will have different values. How about tring that, but replacing the

if session("UserName")="" then


if session("UserName")="0 then

This would however rely on you creating a session with a value of "1" once they have logged in

i object delete request, you can ask any expert from ASP section, my response answers the question.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now