Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Formatting an ASP.Net Menu Control

Posted on 2014-02-16
4
Medium Priority
?
931 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 600 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 900 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 to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
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 …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

916 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