The ImageButton control is used to display a clickable image.
ImageButton control in ASP.NET is just like a Button control.
Events of ImageButton are the same as Button control.
You will provide the image using ImageUrl property of the ImageButton control
Properties
ImageUrl | Gets or Sets the location of the image to display. |
CausesValidation | Value can be set as true/false. This indicates whether validation should be performed when a button is clicked. |
PostBackUrl | Indicates the URL on which the Form will be posted back. |
ValidationGroup | Gets or Sets the name of the validation group that the button belongs to. This is used to validate only a set of Form controls with a Button. |
OnClick | Attach a server side method that will fire when button will be clicked. |
OnClientClick | Attach a client side (javascript) method that will fire when button will be clicked. |
DEMO

protected void ImageButton1_Click1(object sender, ImageClickEventArgs e)
First - Add - New Webform - Select Image Button From ToolBox
Next - Add the image(tiger.jpg) to solution Explorer
Next - Go to ImageButton Property Window - Select ImageUrl
Html Code For ImageButton
Next - F5 Run the form - Dispaly Tiger image
Next - Double Click Image
Show the PopUp Message
0 comments:
Post a Comment