System.Web.UI.HtmlControls.HtmlInputImage.OnServerClick Method

Raises the HtmlInputImage.ServerClick event.

Syntax

protected virtual void OnServerClick (System.Web.UI.ImageClickEventArgs e)

Parameters

e
An System.Web.UI.ImageClickEventArgs that contains event data.

Remarks

The HtmlInputImage.ServerClick event is raised when the user clicks an System.Web.UI.HtmlControls.HtmlInputImage control.

The coordinates where the user clicks an System.Web.UI.HtmlControls.HtmlInputImage control can be determined by using the System.Web.UI.ImageClickEventArgs.X and System.Web.UI.ImageClickEventArgs.Y properties of the System.Web.UI.ImageClickEventArgs object. The System.Web.UI.ImageClickEventArgs object is passed as a parameter to the user-defined event handler.

Note:

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 HtmlInputImage.OnServerClick(System.Web.UI.ImageClickEventArgs) 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.

Requirements

Namespace: System.Web.UI.HtmlControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0