$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Image Button in ASP.NET AJAX
Home > How to > Image Button

Information to Image Button

What is image button? When an image is used as a background of a button or when an image is used as the button itself, we call this kind of buttons as image button. Similar to icon button, image button can be also treated as an enhanced version of standard button and it owns the ability to increase the intuitiveness of the button.
How to create an image button in ASP.NET web application? The PerButton from our ASP.NET AJAX offers users rich options to create and customize an image button. One thing that needs to be specifically stated here is that since we do not support the tag, users needs to set the width & height when using PerButton control to create an image button.

Image properties

In this part, we will offer detailed guidance on how to customize the settings of image icon properties. And we will introduce the configuration of image button properties from following three aspects.
  1. ImageUrl: by setting ImageUrl property to the location of the image that you are going to use, you can easily display an image on the button. This is the easiest way to add an image to the button.
  2. IsBackgroundImage: If you set this property to true, the defined image will be used as the background of the target button.
  3. Event url: If you want to show a different image on the button in specific situations, you can call following three events.
    • DisabledImageUrl: the image in current url will be displayed on the button when the PerButton control is disabled.
    • HoveredImageUrl: the image in the defined url will be showed when the mouse pointer is over the control.
    • PressedImageUrl: the image in the defined url will be showed when the button is pressed.

How to build a simple image button

In this part, we offer you a detailed coding guidance on how to create an image button in ASP.NET web application. To achieve AJAX effect, please drag an AjaxPanel component from toolbox to aspx web page and then drag a button control from toolbox to that AjaxPanel. By the way, please make sure that you have installed .NET Framework 3.5 or above versions and that you have installed all the necessary dlls into your ASP.NET web application.
<kettic:PerButton ID="PerButton1" runat="server" Width="100" Height="100">
<Image ImageUrl="../../../Images/Button/Timer.jpg" IsBackgroundImage="True"></Image>

Related Image Button Links

Here we recommend a link for those who want to build an image button in ASP.NET web application using C# code. View more at build image button using c#.