Hi,
Can anyone tell me whats wrong with this code:
The code is an example taken from asp.net unleashed by Stephen Walther, but fails to compile in the browser.
I am new to asp.net, but have been doing asp for ages. Is there an equivalent to on error goto 0 in asp.net?
Thanks in advance,
SonD
Can anyone tell me whats wrong with this code:
Code:
<script runat="server">
sub ImageButton_Click (s as object, e as EventArgs)
lblXLocation.text=e.X
lblYLocation.text=e.Y
if e.X=100 and e.Y=100 then
lblMessage.Text="You win"
else
lblMessage.Text="You lose"
end if
end sub
</script>
<html>
<head><title>Image.aspx</title></head>
<body>
Hit the image at 100*100
<form runat="server" ID="Form1">
<asp:ImageButton ImageUrl="Images/Icon.jpg" OnClick="ImageButton_Click" Runat="server"/>
<p>x coordinate: <asp:Label id="lblXLocation" runat="server"/></p>
<p>y coordinate: <asp:Label id="lblYLocation" runat="server"/></p>
<p><asp:Label ID="lblMessage" Runat="server"/></p>
</form>
</body>
</html>
The code is an example taken from asp.net unleashed by Stephen Walther, but fails to compile in the browser.
I am new to asp.net, but have been doing asp for ages. Is there an equivalent to on error goto 0 in asp.net?
Thanks in advance,
SonD