Retrieving Clicked Coordinates through the HTML Input Image Control (VB.net)
<%@ Page Language=VB Debug=true %>
<script runat=server>
Sub SubmitBtn_Click(Source As Object, E as ImageClickEventArgs)
MyMessage.InnerHTML = "Coordinates Clicked<BR><BR>" _
& "X: " & E.X & "<BR>" _
& "Y: " & E.Y
End Sub
</SCRIPT>
<HTML>
<HEAD>
<TITLE>Retrieving Clicked Coordinates through the HTMLInputImage Control</TITLE>
</HEAD>
<BODY>
<form runat="server">
<span
id="MyMessage"
runat=server
>
</span>
<BR><BR>
<input
id="ImageButton1"
runat="server"
type="image"
src="http://www.java2s.com/style/logo.png"
onserverclick="SubmitBtn_Click"
>
</Form>
</BODY>
</HTML>
Related examples in the same category