2

I am building a menu for my asp.net application using the Menu control which is in turn being fed by a table via a Hierarchical data object. It works great, except that I cannot figure out how to configure the Menu control to disallow clicking on the menu items with no designated URLs.

For instance, I have a static toplevel menu item. I hover my mouse over it and a dynamic menu list appears for my choosing pleasure. Each dynamic menu item contains a link to a page that is invoked when I click my mouse on it. Whereas the static top level menu goes nowhere. How can I make it so that clicking on that top level static menu does not act like it is a link?

Thanks jw

1 Answer 1

7

Is this perhaps what you are looking for?:

<Items>
    <asp:MenuItem  Selectable="false" Text="Search Engines" >
        <asp:MenuItem NavigateUrl="http://www.google.com" Text="Google"></asp:MenuItem>
        <asp:MenuItem NavigateUrl="http://www.google.com" Text="Google"></asp:MenuItem>
        <asp:MenuItem NavigateUrl="http://www.google.com" Text="Google"></asp:MenuItem>
    </asp:MenuItem>
</Items>

Good luck!

1
  • Yes. That is exactly what I needed. It really should have jumped out at me. Thank you.
    – user770294
    Commented Dec 16, 2011 at 17:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.