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

x
?
Solved

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

Posted on 2011-02-28
3
Medium Priority
?
711 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
ID: 34997819
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 1000 total points
ID: 34997892
0
 
LVL 16

Assisted Solution

by:Kalpesh Chhatrala
Kalpesh Chhatrala earned 1000 total points
ID: 34999213
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

971 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