locked
web control that extends CheckBox is rendering in span element when CssClass is set RRS feed

  • Question

  • User1812098621 posted

    I created my own web control that inherits from CheckBox. When I set the CssClass on my control it renders an html checkbox inside a span element. i don't want it to do that. is there a way to prevent this? 

    Friday, March 28, 2008 5:53 AM

Answers

  • User481221548 posted

    Hello

    Override the TagKey Property, or better, attaching a inline style Attribute to <CheckBox>.InputAttributes

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, March 28, 2008 7:08 AM
  • User1872602287 posted

    Peter,

     Here's an answer I posted to a similar question yesterday:

    http://forums.asp.net/t/1238549.aspx

    Hope this helps!

     Jon

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, March 28, 2008 1:37 PM

All replies

  • User481221548 posted

    Hello

    Override the TagKey Property, or better, attaching a inline style Attribute to <CheckBox>.InputAttributes

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, March 28, 2008 7:08 AM
  • User1872602287 posted

    Peter,

     Here's an answer I posted to a similar question yesterday:

    http://forums.asp.net/t/1238549.aspx

    Hope this helps!

     Jon

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, March 28, 2008 1:37 PM