ASP.NET MenuItem CSS Class
Posted on 2008-11-14
I am using System.Web.UI.WebControls.Menu bound to an XMLDataSource for my menus. I have a menu structure like this:
I currently have a CSS Class on all categories (including SubCategories) called "categoryItem", plus one on the main level called "categoryLevel1" and one on the subcategories called "categoryLevel2". This is all accomplished using LevelMenuItemStyles.
In addition, I need to give each main level category a unique CSS class like "categoryNumber1", "categoryNumber2", "categoryNumber3". How can I accomplish this?