473,386 Members | 1,720 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,386 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 3607
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: 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:
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.