Adds a style item to the System.Web.UI.CssStyleCollection collection of a control using the specified System.Web.UI.HtmlTextWriterStyle enumeration value and corresponding value.
- key
The System.Web.UI.HtmlTextWriterStyle enumeration value to add to the collection.
- value
The value of the style attribute to add to the collection.
If the style item to add exists in the System.Web.UI.HtmlTextWriterStyle enumeration, use this CssStyleCollection.Add(HtmlTextWriterStyle, string) overload of the erload:System.Web.UI.CssStyleCollection.Add method rather than the overload that does not take an System.Web.UI.HtmlTextWriterStyle parameter.