Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to create a dropdown menu in ASP.NET 4.5

Posted on 2013-05-26
3
Medium Priority
?
1,248 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
duttcom earned 1200 total points
ID: 39198326
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
ID: 39201548
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
ID: 39204033
Just what I needed.

Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
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…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

688 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