Having difficulty getting the menu control to behave the way I want it to.

Last post 09-11-2007 11:01 PM by Johnson2007. 4 replies.

Sort Posts:

  • Having difficulty getting the menu control to behave the way I want it to.

    09-05-2007, 12:15 PM
    • Member
      538 point Member
    • bryankia
    • Member since 12-30-2002, 10:00 AM
    • Tulsa
    • Posts 125

    so here are my issues

    1. the users would like the menu to drop down only when the highest level is clicked.

    2. The only part of the drop down menu that is selectable is where the letters are so if I have a long menu item next to a short one the selectable area is small.

     

    below is how my menu is set up

    Thanks,

    Bryan

    <asp:Menu ID="MainMenu" runat="server" Orientation="Horizontal" MaximumDynamicDisplayLevels="1"

    DataSourceID="SiteMapDataSource1" DynamicEnableDefaultPopOutImage="False" StaticEnableDefaultPopOutImage="False">

    <StaticMenuStyle CssClass="navbar" />

    <StaticMenuItemStyle CssClass="navStaticNormal" />

    <StaticHoverStyle CssClass="navStaticHover" />

    <DynamicMenuItemStyle CssClass="navDynamicNormal" Font-Strikeout="False" />

    <DynamicHoverStyle CssClass="navDynamicHover" />

    </asp:Menu>

  • Re: Having difficulty getting the menu control to behave the way I want it to.

    09-06-2007, 10:34 PM
    Answer

    Hi,

    bryankia:

    1. the users would like the menu to drop down only when the highest level is clicked.

    2. The only part of the drop down menu that is selectable is where the letters are so if I have a long menu item next to a short one the selectable area is small.

    You can try to use the css menu adapter of The ASP.NET 2.0 CSS Friendly Control Adapters  .

    The CSS Friendly Control Adapters allow you to alter the HTML that is rendered by a standard ASP.NET 2.0 server control. 

    There is a video link about the css friendly control adapters: http://www.asp.net/learn/videos/video-185.aspx.

    In this video you can learn that the standard ASP.NET Menu control renders an HTML <table> element, but with the CSS Friendly Control Adapters the same control will render an HTML <ul> list element, improving the menu’s accessibility and presentation.

    Hope it helps.

     

    Amanda Wang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Re: Having difficulty getting the menu control to behave the way I want it to.

    09-11-2007, 12:52 PM
    • Member
      538 point Member
    • bryankia
    • Member since 12-30-2002, 10:00 AM
    • Tulsa
    • Posts 125

    Thanks Amanda.  I have been working a couple of different issues with this and now I am back.  I talked to my boss and he is okay with just a small delay on when the mouse moves over the menu.  the example page you gave me has a small delay but I can not see how they did it.  I have looked in the menu control and I see no delay for the mouse over.  is this in the style sheet?  If so could you point me in the correct direction?

     

    Thanks,

    Bryan

  • Re: Having difficulty getting the menu control to behave the way I want it to.

    09-11-2007, 10:45 PM

    Hi Bryan,

    Using the CSS Adapter you can customize the rendering even further you can easily to modify it however you want.

    A class that derives from the System.Web.UI.Adapters.ControlAdapter base class or one of the built-in sub-classes of it. Within the sub-class, you then override the appropriate methods to customize the markup however you want. 

    You can read this ScottGu's article, CSS Control Adapter Toolkit for ASP.NET 2.0

    In this article, he talked  :

    • What does a control adapter do?
    • how to use these control adapters? 
    •  how to create an ASP.NET control adapter from scratch?
    • How to Get Started with the CSS Adapter Toolkit
     And provided more value material about the CSS Adapter. Hope these help.
    Amanda Wang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Re: Having difficulty getting the menu control to behave the way I want it to.

    09-11-2007, 11:01 PM
    • Contributor
      2,273 point Contributor
    • Johnson2007
    • Member since 05-17-2007, 3:19 AM
    • Posts 449

    CSS Adapter is a good solution.

    But I'd like to instruct you another optional third part control: DHTMLMenu, which surpport expanding submenu item by clicking onto the static menu.  

    Johnson
Page 1 of 1 (5 items)