Where Is MenuItem.Visible?

L

Lee

I really like the new Menu control in ASP.Net 2.0, but I would like to
use a bunch of static <asp:MenuItem's and dynamically turn some on and
off some of them depending on permissions. There is an enabled
property, but there doesn't appear to be any visible property. Surely
I'm missing something. Any thoughts?
 
L

Lee

Ok, I think I'd prefer a MenuItem.Visible, but a decent workaround is
just Menu.Remove and MenuItem.ChildItems.Remove. For instance:

mnuLeftNav.Items.Remove(mnuLeftNav.FindItem("Customers"));

or

mnuLeftNav.FindItem("Customers").ChildItems.RemoveAt(1);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top