System.Web 1.0.5000.0 2.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Web.UI.HtmlControls.HtmlInputControl System.Web.UI.IPostBackDataHandler System.Web.UI.IPostBackEventHandler System.Web.UI.SupportsEventValidation System.ComponentModel.DefaultEvent("ServerClick")

Use the control to create a button that displays an image. You can programmatically control the action associated with the control by providing an event handler for the event.

The coordinates where the user clicks an control can be determined by using the and properties of the object that is passed as a parameter to the user-defined event handler.

For a list of initial property values for an instance of , see the constructor.

Allows programmatic access to the HTML <input type= image> element on the server.

- Constructor

  Use this constructor to create and initialize a new instance of the control.

  The following table shows the initial property value for an instance of .

  Property

  Initial Value

  The "image" literal string.

  Initializes a new instance of the class.

  1.0.5000.0
  2.0.0.0
- Property
  System.String To be added: an object of type 'string'

  Use the property to specify the alignment of the control in relation to the other elements on the Web page.

  Gets or sets the alignment of the control in relation to other elements on the Web page.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.DefaultValue("")
- Property
  System.String To be added: an object of type 'string'

  Use the property to specify the text to display when the specified image is not available or has not been downloaded. You can also use this property to programmatically determine the specified alternative text.

  In browsers that support the ToolTip feature, this text also appears as a ToolTip for the control.

  Gets or sets the alternative text that the browser displays if the image is unavailable or has not been downloaded.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.Localizable(true)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.DefaultValue("")
- Property
  System.Int32 To be added: an object of type 'int'

  Use the property to specify the border width for the control.

  This property is not supported in all browsers. Check your browser to determine compatibility.

  Gets or sets the border width for the control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.DefaultValue("-1")
- Property
  System.Boolean To be added: an object of type 'bool'

  By default, page validation is performed when an control is clicked. Page validation determines whether the input controls associated with a validation control on the page all pass the validation rules specified by the validation control.

  You can specify or determine whether validation is performed on both the client and the server when an control is clicked by using the property. To prevent validation from being performed, set the property to false.

  This property is commonly used in the event handler for the event to prevent page validation from occurring when a Cancel or Reset button is clicked.

  Gets or sets a value indicating whether validation is performed when the control is clicked.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(true)
- Method
  2.0.0.0
  System.Boolean `` ``

  The method checks to see whether coordinates that represent the location where the image was clicked by the user are part of the postback data for the control. If coordinates are part of the postback data, then the method registers the control with the Web page as a control that requires an event to be raised when it is processed.

  The origin coordinates (0,0) are located in the upper-left corner of the image.

  The method is used primarily by control developers extending the functionality of the control.

  Processes the postback data for the control.

  true if the control's state has changed as a result of the postback; otherwise, false.

  The key identifier for the control. The collection of all incoming name values.
- Method
  System.Void ``

  The method is called just prior to rendering the control. The method is used primarily by control developers extending the functionality of the control.

  Raises the event.

  An that contains the event data. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  The event is raised when the user clicks an control.

  The coordinates where the user clicks an control can be determined by using the and properties of the object. The object is passed as a parameter to the user-defined event handler.

  The origin (0, 0) is located at the upper-left corner of the image.

  Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event.

  An that contains event data. 1.0.5000.0 2.0.0.0
- Method
  2.0.0.0
  System.Void ``

  The method is used by the control, when it is clicked, to raise a event.

  If the property is true; the method is called using the group of controls specified in the property.

  This method is used primarily by control developers extending the functionality of the control.

  Raises events for the control when it posts back to the server.

  The argument for the event.
- Method
  2.0.0.0
  System.Void

  The method does not participate in the processing of the control and is included to complete the interface implementation.

  The method is used primarily by control developers extending the functionality of the control.

  Notifies the control that the state of the control has changed.

- Method
  System.Void ``

  The method resolves the URL set in the property, writes the onclick attribute of the rendered control if the property is true, and finally calls the base method. If the value of the property is a malformed URL, an exception is thrown.

  The method is used primarily by control developers extending the functionality of the control.

  Renders the control's attributes to the specified object.

  The that contains the output stream to render on the client. 1.0.5000.0 2.0.0.0
- Event
  System.Web.UI.ImageClickEventHandler

  The event is raised when the user clicks an control.

  For more information about handling events, see Consuming Events.

  Occurs on the server when the user clicks an control.

  1.0.5000.0
  2.0.0.0
- Property
  System.String To be added: an object of type 'string'

  Use the property to specify the location of the image to display in the control. If the image is not available, the text specified in the property is displayed.

  You can use a relative or absolute URL. A relative URL relates the location of the image to the location of the Web page without specifying a complete path on the server. The path is relative to the location of the Web page. This makes it easier to move the entire site to another directory on the server without updating the path to the image in code. You can use the relative path " ~/ " to refer to the current virtual directory where the page is located. For example, the value of for <input type="image" runat="server" src="~/abc/d.gif"> on a page in the "XspTest" virtual directory is <input type="image" src="/XspText/abc/d.gif">. An absolute URL provides the complete path. Therefore, moving the site to another directory requires that you update the code.

  Gets or sets the location of the image file.

  1.0.5000.0
  2.0.0.0
  System.Web.UI.UrlProperty
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.DefaultValue("")
- Method
  1.0.5000.0
  2.0.0.0
  System.Boolean `` `` To be added.

  Implements the interface method by calling the method.

  true if the control's state has changed as a result of the postback; otherwise, false.

  The key identifier for the control. The collection of all incoming name values.
- Method
  1.0.5000.0
  2.0.0.0
  System.Void To be added.

  Implements the interface method by calling the method.

- Method
  1.0.5000.0
  2.0.0.0
  System.Void `` To be added.

  Enables the control to raise events on postback.

  The argument for the event.
- Property
  2.0.0.0
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  Validation groups allow you to assign validation controls on a page to a specific category. Each validation group can be validated independently from other validation groups on the page. Use the property to specify the name of the validation group for which the control causes validation when it posts back to the server.

  This property has an effect only when the value of the property is set to true. When you specify a value for the property, only the validation controls that are part of the specified group are validated when the control posts back to the server. If you do not specify a value for this property and the property is set to true, all validation controls on the page that are not assigned to a validation group are validated when the control posts back to the server.

  Gets or sets the group of controls for which the control causes validation when it posts back to the server.