NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

HtmlInputImage.OnServerClick

Raised on the server when a user clicks an HtmlInputImage control.

[Visual Basic]
Overridable Protected Sub OnServerClick( _
   ByVal e As ImageClickEventArgs _
)
[C#]
protected virtual void OnServerClick(
   ImageClickEventArgs e
);
[C++]
protected: virtual void OnServerClick(
   ImageClickEventArgs* e
);
[JScript]
protected function OnServerClick(
   e : ImageClickEventArgs
);

Parameters

e
Image click event arguments.

Remarks

This server event does cause a round-trip to occur from the client.

Example [Visual Basic]

The following demonstrates how Web developers can access an image's X and Y coordinates by using the using the X and Y properties of the ImageEventArgs instance passed as a parameter to a user-defined event handler.

[Visual Basic]

<html>
<script language="VB" runat=server>
     
Sub ImageBtn_Click(ByVal Sender as Object, ByVal Args as ImageEventArgs)
         MyXValue=Args.X
         MyYValue=Args.Y
     
End Sub
</script>
  <body>
      <input type=image
src="mypic.jpg" OnServerClick="ImageBtn_Click"
runat=server>
  </body>
</html>

See Also

HtmlInputImage Class | HtmlInputImage Members | System.Web.UI.HtmlControls Namespace