如何使用c#在asp.net中动态更改母版页菜单 [英] How to change master page menu dynamically in asp.net using c#

查看:88
本文介绍了如何使用c#在asp.net中动态更改母版页菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用c#在asp.net中动态更改母版页菜单。



我在网络应用程序中只使用一个母版页。但我为不同的用户登录设置了不同的菜单。例如医生,患者,实践等



患者设置不同的菜单............

医生设置不同菜单............

练习设置不同的菜单............但使用相同的母版页。



有可能请回复我。



提前致谢。

How to change master page menu dynamically in asp.net using c#.

I am using only one master page in my web application. but i am set different menu to different user login. e.g. Doctor,Patient,Practice etc.

Patient set different menu............
Doctor set different menu............
Practice set different menu............but used same master page.

it is possible please reply me.

Thanks in advance.

推荐答案

是的,菜单可以按角色显示,如果您正确设置了角色,您可以设置母版页中的所有菜单项,角色将隐藏或显示正确的



这里有几个链接



Yes, menus can be displayed by roles, if you have roles set up correctly you can set all the menu items in the master page and the roles will hide or show the correct

here's a few links

membership : http://msdn.microsoft.com/en-us/library/ff648345.aspx

roles : http://msdn.microsoft.com/en-us/library/ff647401.aspx

http://weblogs.asp.net/scottgu/pages/Recipe_3A00_-Implementing-Role_2D00_Based-Security-with-ASP.NET-2.0-using-Windows-Authentication-and-SQL-Server.aspx

sitemap : http://msdn.microsoft.com/en-us/library/system.web.sitemap.aspx


您可以查看以下链接以了解类似的工作。



http://msdn.microsoft.com/en-us/library/aa581781.aspx [ ^ ]
You can check following links for similar kind of work.

http://msdn.microsoft.com/en-us/library/aa581781.aspx[^]


更多参考资料



http://highoncoding.com/Articles/165_Creating_Menu_Based_on_Role。 aspx [ ^ ]



http://aspalliance.com/1916_ASPNET_Horizo​​ntal_Menu_Control [ ^ ]
More references

http://highoncoding.com/Articles/165_Creating_Menu_Based_on_Role.aspx[^]

http://aspalliance.com/1916_ASPNET_Horizontal_Menu_Control[^]


这篇关于如何使用c#在asp.net中动态更改母版页菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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