{"id":303,"date":"2012-02-24T17:43:00","date_gmt":"2012-02-24T17:43:00","guid":{"rendered":"https:\/\/staging.infragistics.com\/blogs\/?p=303"},"modified":"2025-02-25T13:36:58","modified_gmt":"2025-02-25T13:36:58","slug":"button-with-image-text","status":"publish","type":"post","link":"https:\/\/www.infragistics.com\/blogs\/button-with-image-text","title":{"rendered":"Button with Image &amp; Text in ASP.NET"},"content":{"rendered":"\n<p>A very common need in almost every ASP.NET web application, a UI requirement to have a button control that can display text and image.<\/p>\n\n\n\n<p>Infragistics ships with just that control as part of their <a href=\"\/products\/aspnet\">ASP.NET controls <\/a>offering and it is called <a href=\"\/products\/aspnet\/data-entry-and-display\/buttons\">WebImageButton<\/a>. It is one of the simplest control to work with, yet it gives you the extended button features that you can use for variety of situations. In the last release of the <a href=\"\/products\/aspnet\">ASP.NET product, 2011 Volume 2<\/a>, we added support of <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/system.web.ui.webcontrols.ibuttoncontrol.aspx\" rel=\"noopener\">IButtonControl<\/a> interface, it was a much needed feature for this control to work better with ASP.NET framework. With <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/system.web.ui.webcontrols.ibuttoncontrol.aspx\" rel=\"noopener\">IButtonControl<\/a> support, you can make it a default button for the page, setup <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/system.web.ui.webcontrols.ibuttoncontrol.postbackurl.aspx\" rel=\"noopener\">PostBackUrl<\/a> or connect it with the <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/system.web.ui.webcontrols.ibuttoncontrol.validationgroup.aspx\" rel=\"noopener\">summary validation group<\/a> on your page.<\/p>\n\n\n\n<p>The button comes with a bunch of default presets that you can use, or create you own and apply to it. The button image and text alignment options include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-size: revert; color: initial;\">Button image on the left<\/span><\/li>\n\n\n\n<li>Button image on the right<\/li>\n\n\n\n<li>Button image on the Top<\/li>\n\n\n\n<li>Button image on the bottom<\/li>\n<\/ul>\n\n\n\n<p>You can use it as per your Visual Studio ASP.NET develop style, configure in the mark-up, use the easy to use designer or just code everything up in code behind using C# or VB. In addition to the image and text alignment and styles, it has a postback click event you can hook into to perform server related tasks or a client side click even to process user interactions on the client.<\/p>\n\n\n\n<p>Feel free to shoot me an email if you any questions regarding our ASP.NET products at <a href=\"mailto:murtazaa@infragistics.com\">murtazaa@infragistics.com<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A very common need in almost every ASP.NET web application, a UI requirement to have a button control that can display text and image.<\/p>\n","protected":false},"author":147,"featured_media":997,"comment_status":"publish","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-303","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to"],"_links":{"self":[{"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/posts\/303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/users\/147"}],"replies":[{"embeddable":true,"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/comments?post=303"}],"version-history":[{"count":2,"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/posts\/303\/revisions"}],"predecessor-version":[{"id":2167,"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/posts\/303\/revisions\/2167"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/media\/997"}],"wp:attachment":[{"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/media?parent=303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/categories?post=303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.infragistics.com\/blogs\/wp-json\/wp\/v2\/tags?post=303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}