How to remove span tag from WebControl when rendered

后端 未结 15 943
生来不讨喜
生来不讨喜 2020-12-31 03:34

When using an ASP.NET CheckBox (and in out case, inherited from a CheckBox) it renders a span around the checkbox input control, this span control

15条回答
  •  耶瑟儿~
    2020-12-31 04:16

    You can use the input/checkbox control directly if you don't need a label, or can put one yourself:

    
    
    

    A CSS Adapter may be able to remove the span around the checkbox/label, but I haven't seen one for that purpose.

提交回复
热议问题