Solved

Formatting an ASP.Net Menu Control

Posted on 2014-02-16
4
794 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
  • 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
HTML table 7 54
WPF issue with Trigger 2 67
Server error in 'XXXXXXXX' application. 12 49
Jquery autocomplete 10 27
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This video discusses moving either the default database or any database to a new volume.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now