Why does ASP.Net RadioButton and CheckBox render inside a Span?

This was driving me crazy too until I found the inputAttributes property.

For example, here is how to add a class directly on the checkbox control without the span nonsense:

myCheckBoxControl.InputAttributes.Add("class", "myCheckBoxClass")

Leave a Comment

techhipbettruvabetnorabahisbahis forumu