
ImageButton | 861
WebControls
Namespace
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
Hierarchy
System.Object ➝ System.ValueType ➝ System.Enum(System.IComparable, System.IFor-
mattable, System.IConvertible)
➝ ImageAlign
Returned By
Image.ImageAlign
Passed To
Image.ImageAlign
ImageButton
System.Web.UI.WebControls (system.web.dll)
disposable
class
This class extends the Image class to provide an image control that can respond to
button clicks. The ImageButton class provides both a Click and a Command event, which will
fire when the image is clicked. Use the Command event and the CommandName property to
specify additional information that will be provided to the event handler. This tech-
nique is sometimes used to allow the same event handler to respond to clicks from
multiple ImageButton controls and determine what control fired the event.
By default, clicking an ImageButton control will cause page validation to occur. To
change this behavior, set the CausesValidation property to False.
Hierarchy
System.Object ➝ System.Web.UI.Control(System.ComponentModel.IComponent, System.
IDisposable, System.Web.UI.IParserAccessor, System.Web.UI.IDataBindingsAccessor)
➝
WebControl(System.Web.UI.IAttributeAccessor) ➝ Image ➝ ImageButton(System.Web.UI.
IPostBackDataHandler, System.Web.UI.IPostBackEventHandler)
Right = 2,
Baseline = 3,
Top = 4,
Middle = 5,
Bottom ...