Finding Mouse Coordinates on ASP.NET Web Form

G

Guest

Howdy...

I have an asp.net web form with an ImageButton control on the form. When
clicked, the ImageButton's click event handler is supposed to pass X and Y
coordinates of the mouse click's location on the PAGE. I know that I can see
the X, Y coords for the click event relative to the ImageButton control, but
this does no good for my particular application.

What I am trying to do is display a calendar user control at the exact
location where the user clicked the little calendar placeholder ImageButton.
The calendar user control is encapsulated in an Asp:panel. When the click
event fires, I change the Visible attribute of the panel and set its Left and
Top styles. The control needs to be "Absolutely" positioned to appear as
though it is hovering...

Any ideas would be greatly appreciated!

TIA - TB
 
G

Guest

Why not use javascript to do this?

Since it is all going to happen on client side anyway. This would allow you
to use standard html controls rather than serverside controls, if you want,
but would be very easy to place in the correct location on the client.

Check out http://webfx.eae.net for really cool code using javascript. There
is more than enough source code to help you with almost any javascript
related opperation you could think of.

Hope that heps though
David
 

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

Top