MembershipUser::LastLoginDate Property
Gets or sets the date and time when the user was last authenticated.
Assembly: System.Web.ApplicationServices (in System.Web.ApplicationServices.dll)
public: property DateTime LastLoginDate { virtual DateTime get(); virtual void set(DateTime value); }
For new users, the LastLoginDate is equal to the CreationDate if the user has not yet logged on. The LastLoginDate is updated to the current date and time if a call to the ValidateUser method is successful.
You can also modify the last login date by setting the LastLoginDate property of a MembershipUser and passing the modified MembershipUser object to the UpdateUser method.
The SqlMembershipProvider sets the CreationDate, LastLoginDate, LastActivityDate, and LastPasswordChangedDate date to the same date and time when a membership user is created by the CreateUser method.
The following code example displays all membership user names in a ListBox control and uses labels to show specific membership information for the selected user name, including the LastLoginDate property value for the membership user.
Available since 2.0