I need to alert my users prior to their asp session expiring. I would like to allow them to click a button to extend there session. Is this possible? What are my other options. Any help is appreciated.
I can't help with the code, but with the idea.
After the page load use javascript for a client side counter. There is a time or timer object as I remember. Set it using current session time. For example
var session_time = <%=current_session_time%>;
When counter is zero (or any value you like in this case) a messagebox should appear and ask for extra time. Cancel should retun(false), OK should send some parameter to the current page. Something like
if request.querstring("sessiontime"<>"" then
session.timeout = cint(request.querstring("sessiontime")
else
session.timeout = 30 ' default
end if
' Also set some other default values
extra_session_time = 10
current_session_time = session.timeout
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.