I have a clickable image on my web site that passes the clicked coordinates
back to the server, where they are processed.
When the user is zoomed at 100%, the coordinates correspond to the image
correctly.
When the user is zoomed at any other zoom level, I get the actual pixel
coordinates that they clicked on, rather than a normalized pair.
To reproduce:
1) Create a 100x100 image in paint. Maybe a crosshair so you can reliably
click in the middle. Save it as 100x100.gif
2) Add the following to an ASPX page:
<asp:ImageButton runat="server" ImageUrl="100x100.gif" ID="Map"
onclick="Map_Click" ></asp:ImageButton>
<br /><br />
<asp:Label ID="lblOutput" runat="server"></asp:Label>
3) Add the following to the codebehind:
protected void Map_Click(object sender, ImageClickEventArgs e)
{
lblOutput.Text = "Clicked at " + e.X + ", " + e.Y;
}
4) Load the page in a web browser. Click the center of the image, and the
label will say "Clicked at 50, 50" (or close to that, anyway)
5) Zoom the image out to 200%. Click the center of the image and the label
will say something like "Clicked at 100, 100"
Expected Behavior : Clicking the center of the image should return X=50 and
y=50 to the server, regardless of the client's chosen zoom level.
----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
http://www.microsoft.com/communities...plorer.general