Solved

How do I set menu control css styles from code behind?

Posted on 2011-02-28
3
654 Views
Last Modified: 2012-06-21
I would like to set the css styles for my menu control in the code behind. I tried...


Menu1.Orientation = Orientation.Horizontal;
            Menu1.CssClass = "menu";
            Menu1.StaticMenuStyle.CssClass = "static-menu-style";
            Menu1.StaticHoverStyle.CssClass = "static-menu-style";
            Menu1.DynamicMenuStyle.CssClass = "dynamic-menu-style";

but it doesn't work. is there something I am missing? Any help would be much appreciated.
0
Comment
Question by:bschave2
3 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
Comment Utility
Have you looked at the HTML that is being output by the menu? Is it a case that it is not adding class attributes for the CSS, or that the styles are not being correctly applied?
0
 
LVL 8

Accepted Solution

by:
Anurag Agarwal earned 250 total points
Comment Utility
0
 
LVL 16

Assisted Solution

by:Kalpesh Chhatrala
Kalpesh Chhatrala earned 250 total points
Comment Utility
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

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

743 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

14 Experts available now in Live!

Get 1:1 Help Now