第一次用户登录...上次的消息确定在Asp.Net中登录 [英] first time user login ... That Message for last time assces login in Asp.Net

查看:240
本文介绍了第一次用户登录...上次的消息确定在Asp.Net中登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在登录时间显示用户(上次登录)中显示消息

how to display message in user (last time login) in display in login time

推荐答案

在数据库中,

创建一个 table ,列 UserID int或Guid {取决于您的数据库设计})和 LastLogOn datetime



每当用户登录应用程序时(第一次插入)使用CurrentTime更新UserID。 br />
类似,您可以从特定用户的表格中读取日期时间值并将其显示在屏幕上。



希望它有效。
IN the Database,
Create a table with the columns UserID(int or Guid {depends on your db design}) and LastLogOn( datetime)

whenever the user logs to the Application (Insert for first time)Update the UserID with the CurrentTime.
similary you can read the datetime value from the table for the particular user and display it on the screen.

Hope it works.


每当用户登录时,您都需要保存登录时间。我会在保存用户详细信息的表格中这样做(比如添加一列LastLoginTime)。在对用户进行身份验证以及身份验证是否成功时获取此值。现在您已拥有该值,请使用标签控件显示它。就这么简单!
You will need to save the login time whenever a user logs in. I would do that in the table where I save user details (say by adding a column LastLoginTime). Get this value when you are authenticating the user and if the authentication is successful. Now that you have the value, show it using a label control. As simple as that!


这篇关于第一次用户登录...上次的消息确定在Asp.Net中登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆