Solved

Formatting an ASP.Net Menu Control

Posted on 2014-02-16
4
837 Views
Last Modified: 2014-03-07
This is my first attempt at building a website . . . I'm using ASP.Net.

Thus far I've done some simple HTML and CSS to create a header bar along the top containing the site logo on the left and a horizontal ASP.Net menu along the remainder. I populate the menu items and child items at runtime from a dataset of parent-child tables from a SQL Server database. So far OK, I can glide left to right over the menu items with my mouse and the subitems drop down below as expected, but I don't know how to progress from here as regards fine-tuning its behaviour and formatting.
0
Comment
Question by:TimHudspith
[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
  • 2
4 Comments
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 200 total points
ID: 39863805
There are different approaches that you can take with the styling of the Menu control.

Here is an article that talks about using CSS and styling properties:

Using CSS and Styles with the Menu Control
http://msdn.microsoft.com/en-us/library/ms366731.aspx

The exact usage depends on your requirements.
0
 
LVL 7

Accepted Solution

by:
Kishan Zunjare earned 300 total points
ID: 39866566
Database Driven Dynamic Menu Control with CSS and formatting.

http://www.codeproject.com/Tips/526004/Database-Driven-Dynamic-Menu-Control

Hope this helps
-Kishan
0
 

Author Comment

by:TimHudspith
ID: 39869492
Thanks for the links. My menu looks just like the one shown in the CodeProject link - one static horizontal layer with three dynamic vertical submenus, each appearing to the right of the parent. One drawback of this control is that it does not allow you to style individual menu items, but I've done a workaround by giving certain items an identity using the href attribute, which I then style with CSS classes that target the href value.

The problem I have is on the right-hand side of the menu bar. There is no room to show the last two submenus, so I want to push them left of the parent, not to the right. So I need to create a style for the <ul> element containing these items. I looked at the markup rendered in the browser to find the ID of the <ul> tags, then created an external style with that selector to override the auto-generated inline style (using '!important'), but it won't override.
0
 

Author Comment

by:TimHudspith
ID: 39911863
In the end I gave up with the ASP menu control. The amount of CSS manipulation it allows is so limited it's pretty much useless.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

756 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