Session questions

Results 1 to 2 of 2

Thread: Session questions

  1. #1
    Join Date
    Dec 1969

    Default Session questions

    Dunno if this warrants an advanced post but here goes. I am setting up my site to tell me the active the session on my website. I am using the following code:<BR><BR>Sub Application_OnStart<BR> Application("intUserCount") = 0<BR>End Sub<BR><BR>Sub Session_OnStart<BR> Application.lock<BR> Application("intUserCount") = Application("intUserCount") + 1<BR> Application.unlock<BR>End Sub<BR><BR>Sub Session_OnEnd<BR> Application.lock<BR> Application("intUserCount") = Application("intUserCount") - 1<BR> if Application("intUserCount") &#060; 0 then<BR> Application("intUserCount") = 0<BR> end if<BR> Application.unlock<BR>End Sub<BR><BR>Is this sufficient? Any glaring problems with it?<BR><BR>Also, Is there a way to read the total number of sessions with a particular value? <BR><BR>Example: If I assign session("currBrowser") = xxx in each person&#039s session, can I access the total number of people with session("currBrowser") values of "IE"?<BR><BR>Thanks for any information!

  2. #2
    Join Date
    Dec 1969

    Default RE: Session questions

    The value you can use is staring at you:<BR><BR>Your total number of users (active sessions) is = Application("intUserCount")<BR><BR>If you want to find out who&#039s using what, then you can use<BR><BR>request.servervariables("HTTP_USER_AGEN T").

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts