How to check browser activity?

5 pts.
Tags:
ASP
C# .NET
SQL Server 2005
Hi, i'm working a project ,In that i'm storing login,logout time,wht if i don't click logout button and close my browser,or somehow my system shutdown.i cannot store the logout time,so that my program will be in error state.. tell me how to get the logout time when my programmer didn't click logout button and close my browser,or somehow my system shutdown? when system starts again from these failure, i need to display session expired login again. i'm using asp.net with c# 3.5 backend is sqlserver2005...help me to remove this problem...

Software/Hardware used:
asp.net with c# 3.5 backend is sqlserver2005
ASKED: February 25, 2011  2:38 AM
UPDATED: February 25, 2011  8:12 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

I think you can call your logout function from onunload or onbeforeunload javascript event.
This way, when user closes the browser window your logout function will be called before unload the page.

Read about these events <a href=”http://www.javascriptkit.com/jsref/window.shtml”>here</a>

Regards.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following