根据角色更改菜单项列表 [英] Changing the menu item list based on the role

查看:83
本文介绍了根据角色更改菜单项列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在开展一个项目,我有2个角色说管理员,商家。为不同的角色用户显示不同的菜单项。



管理员应该有菜单项,如家,约,报告,商家管理,产品管理。



商家应该只有家,有关,报告,产品管理。



请帮我解决这个问题。

我可以知道我们能不能实现它使用网站地图概念。



任何形式的帮助将不胜感激。



谢谢,

Rohith。

Hi everyone,
I''m working on a project where I have 2 roles say admin, merchant. Different Menu Items are displayed for different role users.

Admin should have menu items like home, aboutus, reports, merchantmanagement, productmanagment.

Merchant should have only home, aboutus, reports, productmanagment.

Please help me to solve this.
May I know can we achieve it with out using sitemap concept.

any kind of help will be appreciated.

Thanks,
Rohith.

推荐答案

在这个项目中正在做类似的事情:



< a href =http://www.codeproject.com/Articles/327764/YaBlogEngine-A-Tiny-Blog-Engine-written-in-ASP-NET> YaBlogEngine - 一个用ASP.NET / C#编写的小型博客引擎 [ ^ ]



查看后面的 MasterPage 代码中的代码管理员文件夹。这不是唯一的方法,但这是实现此目的的一种方式。
A similar thing is being done in this project:

YaBlogEngine - A Tiny Blog Engine written in ASP.NET/C#[^]

Check out the code in the MasterPage code behind of the Admin folder. This is not the only way but this is one way to implement this.


这篇关于根据角色更改菜单项列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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