If you hold a value in the session, then look for the value on the next server request. That's about as good as it gets. If this causes usability or functionality problems then maybe consider cookies to persist information or even extend the period the session is held for.
My site updates a database with a new entry every time they visit a page. So I can track them that way like you suggested, but I want to be able to see if they're just sitting there with their browser open or if they closed the window down and ended the session.
I know what you're saying but the web just doesn't work like that. The only way I can think of is running an application on the server to poll the users activity or perhaps employ an Applet or ActiveX control. This is an extreme overhead though. The web isn't capable of push technology using ASP; it's the client that requests.
Is this some database cleanup function you're wishing to employ? Perhaps the reason for the need to know client activity at that level could provide us with potential solutions to this requirement.
It's not something that I have to have. It would just be useful to be able to see if anyone is still on there so that I can put the site under construction and get into the database. I'm also just curious to see how people are using our new site.