Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 4th, 2007, 05:59 AM
Authorized User
 
Join Date: Mar 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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







Similar Threads
Thread Thread Starter Forum Replies Last Post
how to redirect to logout page when session expire madhusrp ASP.NET 2.0 Basics 10 April 4th, 2007 08:16 AM
what is session id and when does it expire nidhimittal PHP How-To 3 June 29th, 2006 05:17 AM
what is session id and when does it expire nidhimittal Beginning PHP 0 June 26th, 2006 07:20 AM
Session variable mrideout BOOK: Beginning ASP.NET 1.0 1 August 12th, 2004 07:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.