如何在asp.net中登录页面 [英] how to login page in asp.net

查看:101
本文介绍了如何在asp.net中登录页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的登录页面中,有2个登录信息中心分别用于管理员登录和客户登录页面.
两者都在同一页面上.当我可以访问客户登录名,用户名和密码时,请按Enter键触发管理员登录事件....


您能告诉我如何处理吗?...

in my login page , 2 login dashboards are used admin login and customer login page.
both are same page.when i have access customer login, username and password click enter button admin login event fired....


can u tell me how to process....

推荐答案

不要在同一页面上进行两次登录-这是使用户感到困惑的秘诀. br/> 相反,请进行一次登录,然后根据用户名和在数据库中分配给该用户的角色来确定角色(用户或管理员).
Don''t have two logins on the same page - it is a recipe for confusing your users.
Instead, have a single login, and decide the role (user or admin) from the user name and the role assigned to that user in the database.


为此使用成员身份.只需输入一个登录控制并为用户指定角色.
Use membership for that.Just put one login control and specify roles for users .


您可以在数据库表中定义字段名称usertype,并使用它在登录时区分普通用户和admin用户.

希望对您有所帮助:)

有关更多查询,请在此处评论!!!
you can define a field name usertype in your database table and use this to distinguish between normal user and admin user at the time of login.

hope it helps :)

for further queries comment here!!


这篇关于如何在asp.net中登录页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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