How to remove span tag from WebControl when rendered

后端 未结 15 944
生来不讨喜
生来不讨喜 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条回答
  •  Happy的楠姐
    2020-12-31 04:14

    i wonder, is there a reason no1 mentioned this:

    public MyControl() : base(string.Empty)
    

    i got this reading http://aspnetresources.com/blog/stripping_span_from_webcontrol that flaviotsf mentioned

提交回复
热议问题