2

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?

3
  • you probably want something like a css menu cssmenumaker.com Commented Feb 16, 2012 at 21:03
  • 1
    can you select an answer, or update on why nothing is suitable? Commented Sep 12, 2013 at 20:06
  • can you select an answer, or update on why nothing is suitable? Commented Sep 18, 2017 at 19:23

3 Answers 3

4

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>
Sign up to request clarification or add additional context in comments.

3 Comments

Thanks for verifying Michael.
It does not work as is. It shows a list of items just as if you had a single asp:Menu. Do you have .cs or .css to go with it? to make it work?
I have no idea what you mean. There is no css or code-behind required. The oriiginal question was: Just a static menu that sits on the side of the page and allows you to browse through submenus as well My ASPX markup is exactly that. Please read the question before making incorrect comments.
0

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

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.