Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Okay... time to get explanatory. I'm attempting to include a section on my website that displays users currently logged on, and the number of guests that are on the site. I have a DB setup with the appropriate fields, and have no problem populating them (adding a guest upon opening the site, adding a user that's logged in to my list), but rather unpopulating/updating them upon the user leaving.

 

I've seen this done in many PHP sites, and some .NET, but don't know how to do it myself. Should this be a global.asax thing? I've yet to do a project with global.asax, and this is probably a good time to start. Please let me know.

 

the website is http://www.JoshAndBrandi.com/NEW/

 

feel free to take a look and provide any other constructive criticism. BTW, this site is going to be 100% text/css - NO PICTURES. I'm attempting to provide a VERY speedy product for people that are even on dial-up.

 

Thanks!!!

  • *Gurus*
Posted
You're going about this the wrong way. Instead of looking for an event (the web is a stateless environment, no matter how much one would like it otherwise) that signifies a user leaving, keep track of when they have been there. Each time a user visits a page update a "LastActivity" field in your database with the current date and time. Then, on your "who's online" page, query for those users who have been active within the last 15 minutes or so.
Posted

are layers really more efficient than tables?

and do layers work properly on non-IE browsers??

 

(Probably wrong forum for these kinds of questions, but they seemed relevant to the thread....)

Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept and the wisdom to hide the bodies of those people I had to kill today cos they pi**ed me off.
Posted
Actually, After looking into Layers, I can't say that they're necessarily any more efficient than tables. I know tables take time to render, but c'mon - what doesn't? And for the end result I want, I don't see an efficient way to implement layers.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...