Solved

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

Posted on 2011-02-28
3
694 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

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…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

752 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