如何在使用会话登录后第二次欢迎用户? [英] How to welcome back users after they login for second time using sessions?

查看:59
本文介绍了如何在使用会话登录后第二次欢迎用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在asp.net中创建了一个登录页面;每当用户成功登录就会显示Welcome..user我的问题是如果同一个用户第二次登录,我想显示WELCOME BACK。 ... USER。如何在asp.net中使用会话?请帮助......

i have created a login page in asp.net;whenever a user successfully log in it will show "Welcome..user"My problem is if the same user login for the second time,i want to display "WELCOME BACK.... USER".How do i do that with sessions in asp.net?Please help......

推荐答案

更好地保存数据库中的登录历史记录检查它是否已登录,做必要的事情
Better you save login history at database side, check it its loggedIn, do necessary things


使用数据库表来跟踪有多少用户处于活动状态并具有活动会话始终是最佳实践,您始终可以检查该用户是否有效,也可以保存其他信息(例如用户登录IP地址)
Its always an best practice to use Database Table to keep track of how many users are having active and had active session you can always check that user is active or not and also can save other information as well(e.g User login Ip address)


这篇关于如何在使用会话登录后第二次欢迎用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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