views:

385

answers:

1

Hi

My inspiration for this question was my discovery of the very annoying default style (border-width: 0px;) on the ImageButton web control. The simple solution is to override it by adding your own style to the control e.g. Style="border-width: 2px;".

How every, it would have been nice to just make a simple control adapter that would just step in at the right place and just tell the control not to render the default styling.

After looking a bit at the code from the CSSFriendly ControlAdapter project, it seems like they are recreating much of the rendering, which is overkill for what I want to do -- i.e. just change the default styling that is rendered out.

So the question, how to just modify the rendering of the default styles through control adapters, and leave the rest as is?

Is it even possible?

Thanks, Egil.

+3  A: 
Brian Surowiec
Fantastic, this is also a good example of how to build a simple Control Adapter. Many thanks!
Egil Hansen