2

I'm trying to create a database driven dropdown menu. For now i'm using a EO.WEB third party component for ASP, which is preety good, but it doesen't give me quite what I need (design-wise). I have a SQL procedure written which gives me the child node names for the menu and their links (eg. CAST(('showInfo.aspx?cityId='+''+CAST(dbo.city.id AS varchar(50))+'&'+'typeId='+CAST(dbo.object_type.id AS varchar(50))) AS varchar(50)) AS 'WebSiteLink') I just need to find the simplest way to implement it and customize as much as possible.

A reference to a third party component or some other app or anything would be most helpfull!

Thanks in advance for the anwsers!

1 Answer 1

3

ASP.NET has a built in menu control, which you can do a lot with. You can bind it to your data or add MenuItems one at a time in the codebehind.

 <asp:menu id="NavigationMenu" CssClass="NavigationMenu" 
    staticdisplaylevels="2" DynamicHorizontalOffset="1"
    staticsubmenuindent="1px" MaximumDynamicDisplayLevels="4"
    orientation="Horizontal"  
    DynamicPopOutImageUrl="~/Images/right-arrow.gif"
    StaticPopOutImageUrl="~/Images/drop-arrow.gif"
    datasourceid="MenuSource"   
    runat="server" Height="30px">
    <staticmenuitemstyle ItemSpacing="10" CssClass="staticMenuItemStyle"/>
    <statichoverstyle CssClass="staticHoverStyle" />
    <StaticSelectedStyle CssClass="staticMenuItemSelectedStyle"/>
    <DynamicMenuItemStyle CssClass="dynamicMenuItemStyle" />     
    <dynamichoverstyle CssClass="menuItemMouseOver" />
    <DynamicMenuStyle CssClass="menuItem" />
    <DynamicSelectedStyle CssClass="menuItemSelected" />
    <DataBindings>       
         <asp:MenuItemBinding DataMember="siteMapNode"
            NavigateUrlField="url" TextField="title" 
                ToolTipField="description" />
    </DataBindings>
  </asp:menu>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.