ASP.NET renders CheckBox control inside span if CssClass is set

I added an ASP.NET CheckBox control to a form I was creating and was surprised to see the following unexpected html rendered when CssClass property was set for the control: ASP.NET code: Rendered HTML: I tried adding the class attribute to the control’s Attributes collection in code-behind without success. Finally, after reading StackOverflow and MSDN, …

Continue reading