I'm having a perplexing problem with my menu control using asp.net. Basically, I want a menu control that behaves similar to a Windows menu. For example:
File
- New
- Open
- Save
- Exit
In this instance under Windows, when one clicks on "File", the menu options (submenu) popup and the user can select on New to Exit, but the user cannot choose "File" because it does nothing more than serve as a tool to open the submenu.
I have a asp.net menu control that is similar. On my menu control, however, the "File" part is clickable (and defaults to the current page). I don't want it to be clickable as it is confusing to the user. The text highlights as clickable and when the click on it, in their eyes, nothing happens but a page reload. I simply want that if the user hovers over "File", then the submenu pops up and only the submenu items are clickable.
Here's some sample code:
Expand|Select|Wrap|Line Numbers
- <asp:Menu ID="Menu1" runat="server" Font-Names="Arial" Font-Size="10pt" Orientation="Horizontal" Font-Bold="True" StaticDisplayLevels="1" BorderStyle="None">
- <Items>
- <asp:MenuItem Text="File" Value="Trainings">
- <asp:MenuItem Text="New" Value="New" NavigateUrl="NewStuff.aspx"></asp:MenuItem>
- <asp:MenuItem Text="Open" Value="Open" NavigateUrl="OpenStuff.aspx"></asp:MenuItem>
- <asp:MenuItem Text="Save" Value="Save" NavigateUrl="SaveStuff.aspx"></asp:MenuItem>
- <asp:MenuItem Text="Exit" Value="Exit" NavigateUrl="ExitStuff.aspx"></asp:MenuItem>
- </asp:MenuItem>
- </Items>
- </asp:Menu>
Robert