ImageMap Coordinate Question

G

Guest

After setting an image map in html all i get is nothing from my
Request.MapImageCoordintes call. I'm doing something simple
wrong, but have tried many things. Any advice appreciate.

I'd like to know the X,y of the user's click.

Dim iCoordinates() As Integer
iCoordinates = Request.MapImageCoordinates("MyMap")
 
K

KJ

Hello Richard,

Could you please post a little more of the asp.net code/html (server
tags, etc)?
 
G

Guest

Thanks, i should have done this the first post.
I want to postback to the same page as my image.

html

<MAP name="MyMap">
<area shape="RECT" coords="0,0,422,359" href="usamap.aspx">
</MAP><IMG isMap src="Images/US.bmp" useMap="#MyMap">

event code

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Try
If IsPostBack Then
Dim iCoordinates() As Integer
iCoordinates = Request.MapImageCoordinates("MyMap")
Me.TextBox1.Text = "X: " + iCoordinates(0) + " Y: " +
iCoordinates(1)
End If
Catch ex As Exception
End Try
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top