user489041
user489041

Reputation: 28312

ASP.Net Menu with Sub Menus

I would like to create a menu in my web application. This menu has just needs to be vertical, and be able to operate something like this:

enter image description here

It doesn't need to be a pop up menu or anything. Just a static menu that sits on the side of the page and allows you to browse through submenus as well. I am new to asp.net and not sure if such a control exists or even what it would be called. Could someone asit me in my doing this? Does such a control exist or do I need to create it?

Upvotes: 2

Views: 31899

Answers (3)

David
David

Reputation: 73594

The Menu Control does this.

It's not as elegant as some javascript versions, but it works.

Since you say you're new, there are also plenty of videos showing how to use it, including this one.

Upvotes: 0

Shyju
Shyju

Reputation: 218892

You can do this with javascript. There are already some plugins available.

http://www.javascripttoolbox.com/lib/contextmenu/

http://www.webdeveloperjuice.com/2010/02/22/create-simple-jquery-right-click-cross-browser-vertical-menu/

http://www.abeautifulsite.net/blog/2008/09/jquery-context-menu-plugin/

You can customize the CSS to look like the windows 7 menu

Upvotes: 0

Seany84
Seany84

Reputation: 5596

You could use the standard ASP:Menu server control.

<asp:Menu ID="Menu1" runat="server" StaticDisplayLevels="3" Orientation="Vertical">
  <Items>
    <asp:MenuItem Text="File" Value="File">
      <asp:MenuItem Text="New" Value="New"></asp:MenuItem>
      <asp:MenuItem Text="Open" Value="Open"></asp:MenuItem>
    </asp:MenuItem>
    <asp:MenuItem Text="Edit" Value="Edit">
      <asp:MenuItem Text="Copy" Value="Copy"></asp:MenuItem>
      <asp:MenuItem Text="Paste" Value="Paste"></asp:MenuItem>
    </asp:MenuItem>
    <asp:MenuItem Text="View" Value="View">
      <asp:MenuItem Text="Normal" Value="Normal"></asp:MenuItem>
      <asp:MenuItem Text="Preview" Value="Preview"></asp:MenuItem>
    </asp:MenuItem>
  </Items>
</asp:Menu>

Upvotes: 4

Related Questions