{"id":3036,"date":"2014-08-21T08:50:30","date_gmt":"2014-08-21T08:50:30","guid":{"rendered":"http:\/\/enjoyasp.net\/?p=3036"},"modified":"2014-08-21T08:50:30","modified_gmt":"2014-08-21T08:50:30","slug":"aspimage%e6%8e%a7%e4%bb%b6%e7%94%9f%e6%88%90%e7%9a%84%e4%bb%a3%e7%a0%81%e8%87%aa%e5%8a%a8%e5%a2%9e%e5%8a%a0border-width0px%e7%9a%84bug%e5%a4%84%e7%90%86","status":"publish","type":"post","link":"https:\/\/enjoyasp.net\/index.php\/2014\/08\/21\/aspimage%e6%8e%a7%e4%bb%b6%e7%94%9f%e6%88%90%e7%9a%84%e4%bb%a3%e7%a0%81%e8%87%aa%e5%8a%a8%e5%a2%9e%e5%8a%a0border-width0px%e7%9a%84bug%e5%a4%84%e7%90%86\/","title":{"rendered":"ASP:Image\u63a7\u4ef6\u751f\u6210\u7684\u4ee3\u7801\u81ea\u52a8\u589e\u52a0border-width:0px\u7684Bug\u5904\u7406"},"content":{"rendered":"<p>\u5728\u7528ImageButton\u65f6\uff0c\u524d\u53f0\u751f\u6210\u7684\u63a7\u4ef6\u4f1a\u81ea\u52a8\u5e26\u4e0aelement.style{border-width:0px} \u5f71\u54cd\u5176\u4ed6\u6837\u5f0f\u3002<br \/>\n\u8fd9\u4e2a\u662fASP.NET\u7684\u4e00\u4e2aBug,\u9700\u8981\u5b9e\u73b0\u81ea\u5df1\u7684\u7c7b\u89e3\u51b3<br \/>\nusing System;<br \/>\nusing System.Web.UI.WebControls;<\/p>\n<p>public class BorderlessImageButton : ImageButton {<br \/>\n    public override Unit BorderWidth {<br \/>\n         get {<br \/>\n              if (base.BorderWidth.IsEmpty) return Unit.Pixel(0);<br \/>\n              else return base.BorderWidth;<br \/>\n         }<br \/>\n         set {<br \/>\n              base.BorderWidth = value;<br \/>\n         }<br \/>\n  }<br \/>\n}<\/p>\n<p>\u7136\u540e\u4e0d\u4f7f\u7528ImageButton,\u800c\u662f\u4f7f\u7528BorderlessImageButton<br \/>\n\u6216\u8005\u76f4\u63a5\u5728web.config\u589e\u52a0\u6620\u5c04\u5173\u7cfb\u3002<br \/>\n<system.web>\n    <pages>\n         <tagMapping><br \/>\n              <add tagType=\"System.Web.UI.WebControls.ImageButton\" mappedTagType=\"BorderlessImageButton\"\/><br \/>\n         tagMapping><br \/>\n    pages><br \/>\nsystem.web><\/p>\n<p>\u53c2\u8003\uff1aRemove border-width:0px from asp:Image or asp:ImageButton<br \/>\nhttp:\/\/weblogs.asp.net\/reganschroder\/remove-border-width-0px-from-asp-image-or-asp-imagebutton<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u7528ImageButton\u65f6\uff0c\u524d\u53f0\u751f\u6210\u7684\u63a7\u4ef6\u4f1a\u81ea\u52a8\u5e26\u4e0aelement.style{border-width:0 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-3036","post","type-post","status-publish","format-standard","hentry","category-13"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/posts\/3036","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/comments?post=3036"}],"version-history":[{"count":0,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/posts\/3036\/revisions"}],"wp:attachment":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/media?parent=3036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/categories?post=3036"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/tags?post=3036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}