基于ASP.NET Web表单C#菜单的角色 [英] Roles based on menu in ASP.NET web form C#

查看:76
本文介绍了基于ASP.NET Web表单C#菜单的角色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在我的网站动态菜单中...当用户登录菜单时,用户只能访问...我正在使用asp.net网页表单(不是mvc)c#

任何人都可以使用基于菜单的db描述角色附加简单项目

感谢所有

最好的问候

MH



我尝试过:



我在sql server中创建4个表

1-组:组和角色的数据

2-用户:用户数据

3-用户组:用户所属的组

4-菜单:网页表格和网址数据

我如何完成并实现我要求的内容?

how can i do menu in my site dynamic ... when user login the menu appears what the user can access only ... i am using asp.net web form (not mvc) c#
can anyone attach simple project with db describe roles based on menu
thanks for all
best regards
MH

What I have tried:

I Create 4 tables in sql server
1- groups : data of groups and roles
2- users : data of users
3- user group : To which group the user belongs
4- menus : data of web forms and url
how i complete and implement what i asked for ?

推荐答案

不,我们无法附加示例项目。您可以谷歌搜索示例项目。



从您发布的内容中,您剩下要做的就是编写代码,只显示他们可以访问的菜单部分。简单。并且在每个页面中确保你检查以确保他们有权限的On_Init加载。



有一百万种方法可以做到这一点,只需继续做这是适合你的方式。
No, we cannot attach a sample project. You can google for sample projects.

From what you posted all you have left to do is write code that only makes visible the parts of the menu that they have access to. Easy. And also in each page make sure on Load of On_Init that you check to make sure they have permissions.

There's a million ways of doing this, just go ahead and do it the way that works for you.


这篇关于基于ASP.NET Web表单C#菜单的角色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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