473,468 Members | 1,482 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

List of users ins ASP-Site

Before users can use my asp-site, they have to login.
The username is stored in a session variable "USR".
I need a list of all users that are active in my site.
I tried to store the logged usernames in an application
variable when they login in the default.asp site:
Application("AktiveUser") = Application("AktiveUser")
& "<BR>" & Session(USR")
When the Session ends, the username is deleted from the
application variable like this :
Function session_OnEnd in Global.asa
Application("AktiveUser") = ReplaceString(Application
("AktiveUser"), "<BR>" & Session("usr"), "")
Problem : In this function the session variable "USR" is
empty, so the name can not be deleted.
Has anyone a better idea to get a list of active users ?
Thank you all.
Hollek
Jul 19 '05 #1
1 1805
"Hollek" wrote ...
Has anyone a better idea to get a list of active users ?
Thank you all.


I wouldnt call this a 'better' idea, as I expect that the application
variables are typically people use for this however...

You could, upon login set a flag against the users details in the database
(I'm assuming you're using one here)..

You would also need to store the date/time in the database which the user
last did something - and include this update routine on each page, ie, each
time that user arrives at a page it updates the value in the database to
equal the date/time now.

Not sure what your 'inactive' time is - but I'll assume its 20 minutes - so
you'd also want to create a job that runs on the database (assuming more sql
server in my thoughts at the moment) - every 20 mins or so to check for
expired logins, this would use the above date/time field for its values -
finding any it would set the 'logged in' flag back to 'not logged in' etc..

Once this is running nicely, all you'd need to do is create perhaps a view
of the users where the logged in flag was set to true and then pull their
names out and list them on the page or whatever you want to do with them....

As I said initially I expect most people just use application variables -
but this would be an alternative..

Regards

Rob

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: J P Singh | last post by:
Hi There We have dropdown on ASP page. The problem is we have about 900 items in the dropdown. Users scrolling through the list have become very frustrated in the past. Can someone suggest...
8
by: Guy Hocking | last post by:
Hi there, I am having a few problems compiling a list box that is conditional on what is selected in another list box. What i need is a List box (lstArea) that displays one thing when the List...
15
by: C White | last post by:
I've got another drop list problem I am using the following code where users select a name, but it should pass a name and email into the table <select name="user"> <option value="<%...
3
by: jason | last post by:
Hello. I've got this simple collection populate code I downloaded from the net (sorry can't find source now) I'm trying to test, but I can't seem to get it to work. Any help would be greatly...
8
by: Galina | last post by:
Hello I have 6 dependent list boxes on my ASP page:  Faculty;  Lecturer;  Course;  Course occurrence;  Group;  Week commencing date. When faculty is selected, lists of lecturers and...
5
by: Kay | last post by:
Hello, I have two list boxes on my form, one initially displays with items and the other displays blank, by clicking a button, it is possible to move items from one box to another and vice a...
2
by: TK | last post by:
How can I show a list of OS users and groups in an ASP.NET page? Is there MSDN or SDK articles? please help. TK
0
by: johnnyG | last post by:
Greetings, I've authored an ASP.NET 2.0 application hosted in IIS 6.0 on Server 2003 that has a dropdown list with around 30 elements in it. All users use IE 6 on Win XP. For some users the list...
3
by: idletask | last post by:
I have an application that has many windows. One window is used for order processing. I would like this window to display the other users who are also performing order processing (the idea is to...
2
by: rn5a | last post by:
During registration, users have to provide their date of birth. For the date & month part, there are 2 dropdown lists & for the year, there's a textbox. These 3 fields are finally merged together...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.