![]() ![]() | ||
As discussed in the In Depth section of this chapter, you can use image button controls to display images that also can handle click events. This is particularly useful if you want to create image maps—those clickable images that initiate various actions depending on where you click them. Image buttons are supported with the ImageButton class; here is the inheritance hierarchy of this class:
Object Control WebControl Image ImageButton
You can find the notable public properties of ImageButton objects in Table 17.2, and the notable public events in Table 17.3. (This class has no non-inherited methods.) Note that as with other Web server controls, I am not listing the notable properties, methods, and events this class inherits from the Control and WebControl classes—you can find them in Chapter 15, Tables 15.1 to 15.5. This class also inherits the Image class; you can find the public properties of the Image class in Table 17.1.
Property |
Means |
---|---|
CausesValidation |
Gets/sets whether this image button causes validation in other controls. |
CommandArgument |
Gets/sets an optional argument holding data about the command specified with CommandName. |
CommandName |
Gets/sets the command name for this image button. |
Event |
Means |
---|---|
Click |
Occurs when the image button was clicked. |
Command |
Occurs when the image button was clicked—use a Command event handler for this one. |
![]() ![]() | ||