防止 asp:ImageButton 默认内联样式
不幸的是,asp:ImageButton 控件呈现“border-width:0px;”的内联样式属性。 由于多种原因,这令人沮丧。 过去,我通过创建自己的自定义图像按钮控件来解决该问题,该控件不呈现内联样式属性。 我正在寻找一个更优雅的解决方案来解决这个问题。 任何想法将不胜感激。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此处是一个非常简单的ControlAdapter 演示了在需要时添加属性,并在不需要时完全删除它。
Here is a very simple ControlAdapter which demonstrates adding the attribute when desired, and leaving it off entirely when not.