How to create a dropdown menu in ASP.NET 4.5

Posted on 2013-05-26
Medium Priority
Last Modified: 2013-05-29
I am trying to create a dropdown menu

This is what I have:

 <asp:Menu id="NavigationMenu" runat="server" Orientation="Horizontal" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" DynamicHorizontalOffset="16" Font-Names="Arial,Gill,Sans" Font-Size="12px" Height="32px" PathSeparator="," StaticDisplayLevels="2" StaticSubMenuIndent="2px" Width="545px">
          <asp:MenuItem NavigateUrl="~/Default1.aspx" Text="Home" Value="Home"></asp:MenuItem>
          <asp:MenuItem NavigateUrl="~/AboutUs1.aspx" Text="About Us" Value="About Us">
                  <asp:MenuItem NavigateUrl="~/AboutUs1Sub.aspx" Text="About Us Sub"
                                    Value="About Us Sub">

I would like for About Us Sub to appear as a choice below About Us when About Us is clicked.

What do I need to change?

Question by:Dovberman
  • 2
LVL 12

Accepted Solution

duttcom earned 1200 total points
ID: 39198326

StaticDisplayLevels="2" to StaticDisplayLevels="1"

Set to 2 you are saying that you want the first two levels to be static (always visible). By setting it to one, it shows only the first level and anything below that as a drop-down submenu.

Author Comment

ID: 39201548

How do I get the selected dynamic menu item to remain visible with a lime background?

Where can I find documentation?


Author Closing Comment

ID: 39204033
Just what I needed.


Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

SingleRun is a tool that ensures that only one instance of an application is started, running it again brings the application to focus.
The PowerShell Core 6.0 of .NET release is just the beginning. The upcoming PowerShell Core 6.1 would have artificial intelligence and internet of things capabilities. So many things to look forward to in the upcoming release.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
When you have multiple client accounts to manage, it often feels like there aren’t enough hours in the day. With too many applications to juggle, you can’t focus on your clients, much less your growing to-do list. But that doesn’t have to be the cas…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question