Harish Sangwan

Harish Sangwan

  • NA
  • 206
  • 510

How to store login and log out time in database .

Jan 6 2020 3:45 AM
Hi Guys,

The logic is simple. But i dont have an idea to implement it in c#.net application with correct step by step procedure. The thing is
When a user logs in via your login form you insert a new record with the userID & login date time (datetime.now). Now when the user clicks the logout button you set the logout datetime.
However if the session ends you will have to
a) figure out if the session is bound to a user,
b) submit your logout logic.

I have to shown The login Time also in Label field.

Anyhelp will be greatly appreciated.

Answers (1)