Reputation:
How can I remove the dotted border around an asp: Image button. The dotted border shows when I click on the image button. Thanks
Upvotes: 1
Views: 2622
Reputation: 3577
That's the focusing border added by the browser. For usability purposes, it's usually a bad idea to remove it unless you are doing something specific. It's very difficult to select controls using the keyboard without it.
If for some reason you REALLY need to remove it, I believe the other answers here may provide you with a solution. But as someone often concerned with usability, I would advise you to reconsider.
Upvotes: 3
Reputation: 82335
Adding the following attribute/value to the imagebutton should produce the result you are looking for.
OnClientClick="this.blur();"
Upvotes: 1
Reputation: 896
It looks like you are talking about the focusing border added by the browser. There's a trick to do this with Javascript. Add the following to your image tag:
onfocus="this.blur();"
Upvotes: 2