className attributes??
-
Apologises for such a newbie question, but does anyone know how to set the className attributes for ASP.NET server controls, e.g. Dynamically creating a table using HtmlTableRow/Cell and I can't for the life of me see how to set the className attribute. I can see the Style collection, but what about assigning CSS class names????? Thanks in advance Andy
-
Apologises for such a newbie question, but does anyone know how to set the className attributes for ASP.NET server controls, e.g. Dynamically creating a table using HtmlTableRow/Cell and I can't for the life of me see how to set the className attribute. I can see the Style collection, but what about assigning CSS class names????? Thanks in advance Andy
Ahhhhhhh... for those of you that are as cranially vacant :-O as I seem, the answer: the Attribute map, e.g. for (int i=0; i < collMenu.Count; i++) { XmlNode nodeMenuItem = collMenu[i]; // Generate the MENU options available.... HtmlTableRow tr = new HtmlTableRow(); HtmlTableCell td = new HtmlTableCell(); XmlNode nodeTitle = nodeMenuItem.SelectSingleNode("./Title"); td.Attributes["class"] = "xyz"; td.InnerText = nodeTitle.InnerText; tr.Cells.Add(td); idMain.Rows.Add(tr); } Obvious now, but for such an important property of any HTML element you'd think this would have it's own defined property just like the Align,VAlign etc. ?? No ?? Cheers, Andy