如何记住密码. [英] how to remember password.

查看:103
本文介绍了如何记住密码.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想为我的项目执行记住我"功能.

用户名和密码将保存在Cookie或会话中的位置.因此,如果将其设置为记住我,则下次用户将在文本框中获得用户名和密码..


Hi,

I would like to perform ''Remember Me'' functionality for my project.

Where the username & password will be saved either on cookies or in session. So if it is set to remmember me, next time the user will get user name & password in the text boxes..


How it is implemented?

推荐答案

ASP.Net登录控件带有记住我"选项.在MSDN上阅读或搜索google.有很多可用的示例.
The ASP.Net Login control comes with remember me option. Read about it on MSDN or search google. There are a lot of examples available for this.


成功登录后为您的应用创建cookie.在页面加载事件中,检查Cookie是否处于活动状态,然后将勾号"分配给记住"复选框,否则取消勾号.
Create a cookie for your app when you login successfully. In page load event check the cookie if active then assign tick to Remember checkbox else untick.


这篇关于如何记住密码.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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