Solved

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

Posted on 2011-02-28
3
676 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 250 total points
ID: 34997892
0
 
LVL 16

Assisted Solution

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

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

822 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