473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Finding Mouse Coordinates on ASP.NET Web Form

TB
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
Nov 22 '05 #1
2 3606
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

"TB" wrote:
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

Nov 22 '05 #2
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

"TB" wrote:
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

Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: TB | last post by:
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...
2
by: Robert Chan | last post by:
I have a form that is 2000x700 it is meant to be run across two monitors I want to get the mouse position relative to the form not to the screen is there any kind of way to reference the forms...
5
by: Smoke | last post by:
What i want to do, is, in the Activate Event of my form, determine which is the mouse possition, or, maybe even easy, just determine if the mouse is over my form. I need to do two differents things...
4
by: Henry Wu | last post by:
Hi, I see examples of Magnifying an area under mouse coordinates to a form or picturebox using VB6 and VC6, does anyone know how to do it under VB.NET? Its nice to use the new GDI+ for it. ...
3
by: Tom | last post by:
I have a picturebox on my VB.NET form. The picturebox size mode is set to stretched. I then load an image into that form and display it. As the user moves the mouse over the form, I want to get and...
3
by: aam | last post by:
Hi. I am trying to find the cursor coordinates inside of a window, not a form. I would like to display the coordinates of the cursor when you click inside of the window. Either that, or have the...
7
by: RobKinney1 | last post by:
The subject line sounds a little funny, let me quickly explain: I have created a custom control using ComboBox. But inside my class, I need to know when the user does NOT click my control. Of...
2
by: quickcur | last post by:
Hi, I have html like this: <div id="myCanvas" style="border:10px, black;position:relative;height:250px;width:100%;"> <img id="p" src="p.jpg"> </div> When user click the mosue, I would like ...
3
by: wanwan | last post by:
I made a game with a window form that needs to record the mouse position to an array at 100 samples per second, so I use the mouse move event to do the job. The problem is the mouse move event...
4
by: mbatestblrock | last post by:
I hope this makes some sense. My ultimate goal here is to execute a block of code if the mouse has not moved in a minute or so within the broswer. The machine I am running this on is for internal...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.