Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ASP Horizontal menu with Vertical sub menus?

Posted on 2011-02-17
5
Medium Priority
?
1,326 Views
Last Modified: 2012-05-11
I am new to ASP development.  Is it possible to use the menu control in a VS 2010 ASP web project to show a horizontal main menu with some vertical sub menus?
0
Comment
Question by:EYoung
[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
  • 3
5 Comments
 
LVL 9

Expert Comment

by:rawinnlnx9
ID: 34919498
The horses mouth: http://msdn.microsoft.com/en-us/library/ecs0x9w5(v=vs.80).aspx

Here is a comprehensive tutorial that does exactly what you wish to do:
http://www.eggheadcafe.com/articles/20050531.asp
0
 
LVL 7

Author Comment

by:EYoung
ID: 34919728
rawinnlnx9 - The first reference explains the difference between dynamic vs static menus but does not show how to use both within the same menu.  The second reference uses a binding source which is not what I want to accomplish.  Attached is my code.  Any other ideas?
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="Retail_Reporting_System._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Retail Reporting System</title>
    <style type="text/css">
        #form1
        {
            height: 226px;
        }
    </style>
</head>
  <body background="Images/Flagship_Store_50.JPG">

    <form id="form1" runat="server">

<!--...-->

    <div id="Layer1" style="position:relative; left:0px; top:0px; z-index:5"><img src="Images/RRS_1.jpg" alt="RRS" style="margin-left: 0px"/></div>    
    <div id="Layer2" style="position:absolute; left:1013px; top:30px; z-index:5; width: 209px;" align="right"><asp:LoginName ID="LoginName2" runat="server" /></div>
    <div id="Layer3" style="position:absolute; left:10px; top:148px; z-index:5">

    <asp:Menu ID="Menu1" runat="server" BackColor="White" ForeColor="Maroon"
        DynamicHorizontalOffset="5" Font-Names="Times New Roman" Font-Size="Medium" 
        DynamicSubMenuIndent="10px" Width="350px" Orientation="Vertical"
        Font-Bold="False" Height="16px" MaximumDynamicDisplayLevels="6" StaticDisplayLevels="2">
               
        <DynamicHoverStyle BackColor="White" ForeColor="Maroon" Font-Bold="True" />
        <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" 
            BackColor="White" ForeColor="Maroon"/>
        <DynamicMenuStyle BackColor="White" />
        <DynamicSelectedStyle BackColor="White" ForeColor="Maroon" Font-Bold="True" />
        <Items>
            <asp:MenuItem Text="Home" Value="Home"></asp:MenuItem>
            <asp:MenuItem Text="Edit" Value="Edit"></asp:MenuItem>
            <asp:MenuItem Text="Monitor" Value="Monitor"></asp:MenuItem>
            <asp:MenuItem Text="Reports" Value="Reports">
                <asp:MenuItem Text="Retail Executive Flash Sales" Value="Retail_Executive_Flash_Sales"></asp:MenuItem>
                <asp:MenuItem Text="Retail Class Sales" Value="Retail_Class_Sales"></asp:MenuItem>
            </asp:MenuItem>
        </Items>
        <StaticHoverStyle BackColor="White" ForeColor="Maroon" Font-Bold="True" />
        <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
        <StaticSelectedStyle BackColor="White" ForeColor="Maroon" Font-Bold="True" />
    </asp:Menu>
    </div>  

    </form>

  </body>
</html>

Open in new window

0
 
LVL 3

Accepted Solution

by:
chrisrbloom earned 2000 total points
ID: 34920148
Yes, but if you're using IE 8, you may have a problem displaying the submenus.

see the KB article from MS.

http://support.microsoft.com/kb/962351
0
 
LVL 7

Author Comment

by:EYoung
ID: 34921162
Yes, that solved the problem.  It is a bug in IE8 having to do with the asp:menu control.

Here is the direct url to download the hotfix:
http://code.msdn.microsoft.com/KB962351/Release/ProjectReleases.aspx?ReleaseId=2648

Thanks
0
 
LVL 7

Author Closing Comment

by:EYoung
ID: 34921171
See final comments and url for bug fix download.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
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…
Suggested Courses

618 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