Question

Unfortunately the asp:ImageButton control renders an inline style attribute of "border-width:0px;" This is frustrating for a variety of reasons. In the past I have worked around the problem by creating my own custom image button control which doesn't render the inline style attribute. I am looking for a more elegant solution to the problem. Any thoughts would be greatly appreciated.

Was it helpful?

Solution

Here is a very simple ControlAdapter which demonstrates adding the attribute when desired, and leaving it off entirely when not.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top