ImageButton control is used to display an image that responds to mouse clicks. Specify the image to display in the control by setting the ImageUrl property.
Both the Click and Command events are raised when the ImageButton control is clicked.
By using the OnClick event handler, you can programmatically determine the coordinates where the image is clicked. You can then code a response based on the values of the coordinates. Note the origin (0, 0) is located at the upper-left corner of the image.
You can use the OnCommand event handler to make the ImageButton control behave like a command button. A command name can be associated with the control by using the CommandName property. This allows multiple ImageButton controls to be placed on the same Web page. The value of the CommandName property can then be programmatically identified in the OnCommand event handler to determine the appropriate action to perform when each ImageButton control is clicked. The CommandArgument property can also be used to pass additional information about the command, such as specifying ascending order.
Revision number 2, Tuesday, February 26, 2008 1:28:29 AM by mbanavige
You must Login to comment.
Revision #2
Tue, Feb 26, 2008 1:26 AM
by
|
Image
Use the Image control to display an image on the Web Forms page. Setting the ImageUrl property specifies the path to the displayed image. You can specify the text to display in place of the image when the image is not available by setting the AlternateText
|
Revision #17
Tue, Feb 12, 2008 8:02 PM
by
|
Web Controls
Web controls are ASP.NET controls which are understood and compiled on the server and render as HTML markup on the page. Most of the web server controls render their own HTML controls (or many HTML controls). The markup that is output froma web control can
|
New
Sat, Oct 30, 2010 1:49 PM
by
|
Upload an Image and an Audio file using C#
In my case, I use a FileUpload Control(Id:->FileUpload1), an ImageButton(ImageButton1) or you can use the Image, a Button Control(Id:->Updatebttn) to upload my Image, Button Control(Id:->Addbttn) to add my Image in database, an image(which I want
|