且构网

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

如何禁用菜单项

更新时间:2023-09-11 21:35:16

使用ASP.NET Menu控件没什么大不了的.

如何以编程方式启用,禁用菜单 [ ^ ]

免费附件

ASP.NET菜单示例 [ JQuery [ ^ ],如果您必须/需要使用纯html构建菜单.

这样您就可以根据登录类型创建菜单结构.

为了理智起见,我不赞成克里斯蒂安使用ASP.NET菜单控件或第三方控件的建议.


Hi,
I have created Exitpass System, so every menu only certain user can access.

This is my system flow:
1) 4 Menu Item - Applicant, Approver, Security, Human Resource(HR)
2) Applicant - access by normal user only
3) Approver - can access menu Applicant and Approver
4) Security - can access menu Applicant and Security
5) HR - can access menu Applicant Human Resourse

Can anybody give me any solution for this...

Thanks and best regards

Using ASP.NET Menu control it''s not a big deal.

How to enable, disable Menu programmatically[^]

Free attachment

ASP.NET Menu Examples[^](Around 35 examples about Menu control)


Given that HTML has no menu functionality built in, you must be using the ASP.NET menu control, or a third party control. What you need to do, is load a menu based on the user. Given that we have no idea how you manage the security aspect, or what menu you''re using, your question is both obvious, trivial, and impossible to answer in any detail. What have you tried ? Where are you stuck ? Why do you have a task that relates to a secure system, if you have no idea how to perform it ?


I personaly would look into JQuery[^] if you have to / need to build the menu''s using pure html.

As you can then create the menu structure according to the logon type.

For sanity I would of gone with Christian''s suggestion using ASP.NET Menu Controls or third party Controls.