Click here to Skip to main content
14,879,536 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a table AccessRight(userID,MenuID,itemID,condition).
contion column is for item is enabled or not.
I have a menu.
I want menu item enabled or disabled according to table value.
Posted

I'm assuming you're using the ASP.NET Menu control. If so, when you're populating the menu (or you can use MenuCtrl.Items and MenuItem.ChildItems to enumerate through), you access a MenuItem class that has an Enabled property
   
The most professional way would be to create your own sitemap provider. By doing this you can use the functionality of roles, enable disable etc you menu items!

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

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900