473,498 Members | 1,218 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Viewing Who is online

Hi guys,

I'd like to add a feature of viewing who is online to my website.
Right now whenever a user logs on to my website I create a Session
variable for him containing his ID.
I'd to have some ideas on how to do it.

Thanks,
Yossi.

May 1 '06 #1
2 1032
Create an Application variable based on the Sessions. Perhaps a hashtable
kept in Application scope?

Jeff
<yo********@gmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...
Hi guys,

I'd like to add a feature of viewing who is online to my website.
Right now whenever a user logs on to my website I create a Session
variable for him containing his ID.
I'd to have some ideas on how to do it.

Thanks,
Yossi.

May 1 '06 #2
Actually what you need here is an Application variable, not a session
variable. Session is specific to that user and so you would have no way to
see it.

You could have either a static Hashtable or an ArrayList in global.asax or
some other class, and In Session_Start in global.asax you could add a new
entry to this. In Session_End, you would remove it.

Be advised that Session_End only fires for InProc session state and is
independent of whether the user still has their browser open or not - it
fires on the server.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"yo********@gmail.com" wrote:
Hi guys,

I'd like to add a feature of viewing who is online to my website.
Right now whenever a user logs on to my website I create a Session
variable for him containing his ID.
I'd to have some ideas on how to do it.

Thanks,
Yossi.

May 1 '06 #3

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

Similar topics

3
4771
by: yogesh | last post by:
How to store the java applet emebedded in a web page for offline viewing? I saved the web page but it got saved without the applet.and also I searched for the corressponding .class file for the...
14
2501
by: Brian Maupin | last post by:
I have a refreshing webcam shot on my site and I was wondering if there was a way I could display how many people are currently viewing it? Thanks in advance.
4
1445
by: tperri | last post by:
I've got a user table with a field called Online, and when a user logs in, I set a value in this column to indicate they are online. And in the same fashion, when they click the logout button, I...
6
1177
by: Cuyler | last post by:
Hello, I would like to display a file in its binary form (1s and 0s), but I'm having no luck... Any thoughts would be most appreciated. Cheers! Cuyler
4
1547
by: George Jordanov Ivanov | last post by:
Folks, When you access your XML Web Service in IE for example (using HTTP), you get the familiar to all of us page: The following operations are supported. For a formal definition, please...
10
5280
by: NH | last post by:
I have a girdview with paging enabled. How can I add a message in the footer to say "Viewing records 1-15 of 45" etc Thanks
1
3145
by: Nacho | last post by:
Hello, I'm trying to follow some sql sentences that my system send to SQL 2005 express and I don't have a deep knowlegde of databases. I know that there's a transactions log that keeps all...
10
1580
by: Allan Ebdrup | last post by:
I have a custom server web control that inserts another custom web server control in a templated child control (a wisard that inserts a header in its wizardstep) Now after switching to design view...
3
2467
by: =?Utf-8?B?Q2h1Y2sgUA==?= | last post by:
I have some XML I want to display in a section of a web page. I want the XML displayed as a tree. The way you see XML if you load the file in the browser. It shows the tree and you can...
0
7124
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
7200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6884
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
7375
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4904
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
3090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1416
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 ...
1
651
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.