identify which session variable expire
hello there
i have 2 application variables called totalAdminLoggedIn and totalUserLoggedIn
when ever an admin login, I increment the totalAdminLoggedIn value by one
and when a normal user logg in, the totalUserLoggedIn value will be incremented by one.
how can i change the values when the session expire ?
i can reduce the value manually when they logoff like
if session("userCategory")="admin" then
Application("totalAdminLoggedIn")=Application("tot alAdminLoggedIN")-1
elseif session("userCategory")="user" then
Application("totalUserLoggedIn")=Application("tota lUserLoggedIn")-1
end if
session.contents.remove "userCategory"
but what if the session expires automatically or if they close the window suddenly?
ie. i want to do something like below?
Sub Session_OnEnd
Application.Lock
if session with admin value expire then
Application("totalAdminLoggedIn")=Application("tot alAdminLoggedIN")-1
elseif session with user value expire then
Application("totalUserLoggedIn")=Application("tota lUserLoggedIn")-1
end if
Application.UnLock
End Sub
please help
|