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

前端 未结 7 1379
一个人的身影
一个人的身影 2020-12-08 00:12

I would expect this:




        
7条回答
  •  情话喂你
    2020-12-08 00:53

    The plain RadioButton is often rendered without a span. If you set CssClass, Style, Enabled properties, the RadioButton is rendered with a span. This inconsistency is a real pain when I need to manipulate the radio button with client-side scripts. What I usually do is to apply a dummy CssClass so that it will always render a span consistently.

提交回复
热议问题