asp.net中的2级菜单管理 [英] level 2 menu management in asp.net

查看:71
本文介绍了asp.net中的2级菜单管理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我在asp.net中创建了一个菜单,并通过数据库输入管理每个用户的权限。



我能够成功管理主菜单项和1级,但2级菜单没有响应代码。虽然在即时窗口中搜索菜单,但在运行第二级菜单时不会被删除。以下是代码:



Hi All,

I have created a menu in asp.net and managing the rights for each user through database entry.

I am able to successfully manage the main menu items and level 1 but the level 2 menu are not responding to the code. though in immediate window the the menu is searched, in running the 2nd level menu does not get removed. Following is the code:

If dtMenuRights.Rows(0).Item("RORIPROJECTMACHINES.VIEW") = "False" Then
 If Menu1.FindItem("Project/Reports/Project Machines") IsNot Nothing Then
                        Menu1.FindItem("Project").ChildItems.Remove(Menu1.FindItem("Project/Reports/Project Machines"))
   End If
 End If





提前致谢



Thanks in advance

推荐答案

已解决。



用finditem替换finditem(Projects)(项目/报告)



原因:'项目机器'在报告而非项目的子项目中。
Solved.

Replaced finditem("Projects") with finditem("Projects/Reports")

The reason: 'Project Machines' in a child item of reports and not projects.


这篇关于asp.net中的2级菜单管理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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