.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

how to capture last login datetime in asp.net

Posted By: parthiban     Posted Date: March 26, 2013    Points:5   Category :ASP.Net
how to get lastlogin datetime of a user in a website

Responses
Author: parthiban             
Posted Date: March 27, 2013     Points: 20   

plz give an example for the above..

Author: Deco             
Posted Date: March 27, 2013     Points: 20   

Parthiban,

There is no easy thing available in asp.net to get the last login time of a user.

You have to add a column (Last_login_time) in the user table. Every time whenever a user login,

Get the last_login_time from the usertable and update the last_login_time with the current DateTime.



Regards,
Deco
Author: Amit Mehra             
Posted Date: March 26, 2013     Points: 20   

Hi,

You can do that using DateTime class.

Once user logged in you can track the login datetime using

DateTime.Now this will give you the current login time



Thanks,
Amit
Please "Mark As Answer " if this post help you.


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend