且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在注册页面上需要有关userid和pwd的帮助

更新时间:2023-12-01 23:46:10

不,管理员是用户-只是具有额外权限的用户.
通常,您将拥有一个用户表,该表带有一个类型"列(或类,角色或权限,随便您怎么称呼),当您注册某人时,他们总是注册为标准用户.管理员功能之一是将用户提升"为管理员.

这样,您也只需一次登录.

如果您使用内置的ASP.NET MembershipProvider系统,则还可以使用RolesProvider系统,该系统将为您处理所有这些.使用此功能还可以更轻松地保护"您的页面,因为您可以将其保存在需要已登录用户访问的文件夹中,如果未登录的用户尝试访问它们,则可以重定向到登录页面
No, an Admin is a User - just a user with extra permissions.
Normally, you would have a User table, with a Type column, (or class, or role, or permissions, call it what you will) and when you register someone, they always register as a standard user. One of the Admin functions is to "promote" users to admin.

That way, you have just the single login as well.

If you are using the built in ASP.NET MembershipProvider system, you can also use the RolesProvider system, which will handle all that for you. Using this also makes it easier to "protect" your pages, as you can keep them in a folder which requires a logged in user to access, and re-directs to the log in page if a non-logged in user tries to access them.




仅使用一张表格和一张登录表格.登录时,检查用户角色并基于角色重定向到他们的页面.有2个角色:1.用户2.管理员

单击登录按钮时,检查角色,如果是ADMIN,则重定向到管理面板,如果是用户,则重定向到用户面板.
Hi,

Use only one table and one login form. At time of login, Check Role of User and based on Role redirect to their page. There is 2 Roles :1. User 2. Admin

At click of Login Button, Check Role, if ADMIN then redirect to admin Panel and If User then Redirect to User Panel.