Where Is MenuItem.Visible?

  • Thread starter Thread starter Lee
  • Start date Start date
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?
 
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

Back
Top