Solved

How to create a dropdown menu in ASP.NET 4.5

Posted on 2013-05-26
3
1,230 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
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

803 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