Solved

How to create a dropdown menu in ASP.NET 4.5

Posted on 2013-05-26
3
1,217 Views
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">
               
<Items>
          <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">
                  </asp:MenuItem>
                           
          </asp:MenuItem>
  </Items>
                       
</asp:Menu>

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?

Thanks,
0
Comment
Question by:Dovberman
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
duttcom earned 300 total points
Comment Utility
Change-

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.
0
 

Author Comment

by:Dovberman
Comment Utility
Perfect.

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

Where can I find documentation?

Thanks
0
 

Author Closing Comment

by:Dovberman
Comment Utility
Just what I needed.

Thanks
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now