Button with Image and Text in ASP.NET

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. Infragistics ships with just that control as part of their ASP.NET controls offering and it is called WebImageButton. 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 ASP.NET product, 2011 Volume 2, we added support of IButtonControl interface, it was a much needed feature for this control to work better with ASP.NET framework. With IButtonControl support, you can make it a default button for the page, setup PostBackUrl or connect it with the summary validation group on your page.

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:

 

Button image on the left

image
Button image on the right
image
Button image on the Top

image
Button image on the bottom

image

 

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.

Feel free to shoot me an email if you any questions regarding our ASP.NET products at murtazaa@infragistics.com.


Add a Comment

Be the first one to add a comment. Please Login or Register to add comment.