Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to create a dropdown menu in ASP.NET 4.5

Posted on 2013-05-26
3
Medium Priority
?
1,255 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 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

782 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