问题描述
Hello All,
首先是我对这个编码和学习的新手。
我正在尝试为我的Web应用程序创建用户角色,其中每个用户将根据其姓名或ID生成单独的帐户和报告。
如何实现此目标?
例如:
将有两个用户
1.管理员
2.用户
因此,当管理员登录旅馆时,他/她可以相应地看到所有报告。
当用户登录旅馆时,他/她只能查看仅针对该特定用户的报告和数据。
请注意,我使用了ASP.NET默认Web模板以获得身份验证和会话的功能。那么,现在如何将用户角色添加到该默认模板。
另请注意,我需要一个注册表来创建新用户。
我尝试了什么:
我在谷歌搜索后偶然发现很多网站但无法得到逻辑或了解过程。
任何链接或代码对我都非常有帮助。
谢谢
Saikrishna
Hello All,
Firstly am new to this coding and learning step by step.
Am trying to create an User Roles for my Web Application where each User will have separate accounts and Reports generated according to their Names or ID.
How to achieve this?
Example:
There will be two Users
1. Admin
2. User
So when ever an Admin logs inn he/she can see all the reports accordingly.
And when an User Logs inn he/she can only view the reports and data which are meant to that particular User only.
Please, note that i have used ASP.NET default Web template in order to get the functionality of Authentication and Session. Well, now how to add user roles to that default template.
Also note that i need a registration form to create New User.
What I have tried:
I stumbled upon many sites after googling but unable to get the logic or understand the process.
Any Links or Code will be very helpful for me to understand.
Thanks
Saikrishna
推荐答案
这篇关于如何使用C#将用户角色添加到ASP.NET网页。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!