I'm working my way through Pro ASP.NET 3.5 (excellent book) and I'm up to Chapter 4 - Server Controls. The author explains that to set the style attributes of an HtmlInputText control, you can use "Text1.Style.Add("background-color", "lightyellow");".
My problem is that I looked up HtmlControl.Style in the Framework documentation, and it seems to be a get only property - and I couldn't find the associated .Add .. a, erm, method? My first thought was that I was looking in the wrong place in the doco , but then when I hovered over "Text1.Style" in Visual Studio it gave me a tooltip with "CssStyleCollection HtmlControl.Style".
So, am I right in assuming that my Text1.Style does indeed refer to HtmlControl.Style, but that it returns a CssStyleCollection object .. and then, from ins ...
Go to the complete details ...