473,385 Members | 1,465 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.

Changing the cursor to an hourglas

I am building an ASP.Net application that occasionaly "stalls" while running a server side process like a large database update. During this tine the user does not get any feedback as to what is going on, an is likely to try clicking things multiple times which could result in an unwanted outcome.

Is there any way to change the mouse pointer to an hourglass or other such icon to signal the user that the request is being processed?

Thanks

Michael Albanese
Jul 21 '05 #1
4 2058
Hello Michael,

Thanks for your post. As I understand, you want to change the cursor in a
Web Form. Please correct me if there is any misunderstanding.

You can set the cursor to hourglas in the client script by calling the
following line:
document.body.style.cursor="wait";

As in this case, I suggest you to attach javascript click event to the
button (which will perform time-consuming database manipulateion) in the
page_onload like below:
Me.btnDBOperation.Attributes.Add("onclick", "waitcursor()")

And then change the cursor in the corresponding javascript function:

function waitcursor()
{
document.body.style.cursor="wait";
}

Please refer to the following MSDN article for detailed information:

cursor Attribute | cursor Property
http://msdn.microsoft.com/library/de...thor/dhtml/ref
erence/properties/cursor.asp

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #2
Hello Michael,

Thanks for your post. As I understand, you want to change the cursor in a
Web Form. Please correct me if there is any misunderstanding.

You can set the cursor to hourglas in the client script by calling the
following line:
document.body.style.cursor="wait";

As in this case, I suggest you to attach javascript click event to the
button (which will perform time-consuming database manipulateion) in the
page_onload like below:
Me.btnDBOperation.Attributes.Add("onclick", "waitcursor()")

And then change the cursor in the corresponding javascript function:

function waitcursor()
{
document.body.style.cursor="wait";
}

Please refer to the following MSDN article for detailed information:

cursor Attribute | cursor Property
http://msdn.microsoft.com/library/de...thor/dhtml/ref
erence/properties/cursor.asp

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #3
Yes, I want to change the cursor in the web form and the client side
script you sent make a lot of sense.

Thanks!

Michael


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #4
Yes, I want to change the cursor in the web form and the client side
script you sent make a lot of sense.

Thanks!

Michael


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #5

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

Similar topics

3
by: Geoff Soper | last post by:
I'm trying to dynamically change the cursor of a couple of maps over an image. Basically the image is in an online photo system where there is a rotate mode. In this mode clicking on the left or...
2
by: malbanese | last post by:
I am building an ASP.Net application that occasionaly "stalls" while running a server side process like a large database update. During this tine the user does not get any feedback as to what is...
3
by: Tim | last post by:
Hi, How would I go about changing the windows mouse cursor ? (Not the mouse cursor on a form...but the actual mouse cursor in windows..) Any ideas would be greatly appreciated Thanks, Tim
0
by: ahatzig | last post by:
Dear all, i have developed an application and the one thing that kept me busy i the cursor. From the MainFrm file i start an Interface Thread which is anothe dialog. The thing is, before the...
2
by: Dave | last post by:
Is there a way to enlarge the text cursor? We need to make it a bit wider to improve visibility and we cannot find any information about this. Many, MANY thanks in advance!
5
by: Craig G | last post by:
how do you change the cursor in Asp.Net? in windows app's i just used me.Cursor = Cursors.WaitCursor but it aint available in ASP.net
2
by: Jim Frazer | last post by:
Hi, I'm working on an application in C# that will allow the user to create simple CAD drawings on a CEPC system. I would like to be able to change the cursor shape depending on the drawing mode...
5
by: mcraven.2 | last post by:
I know this works on all objects except drop down boxes. doc = document.all for (i=0;i<doc.length;i++) { doc(i).style.cursor = 'wait'; } Is it possible to make a cursor into an hourglass...
3
by: fbergroth | last post by:
Hi, I'm quite new to C# allthough I've been programming in other languages for quite a while. I'd like to change the blinking cursor inside a TextBox, I guess I must derive the class and...
0
by: IanWright | last post by:
I'm trying to change the cursor that appears on a standard ListView when the cursor appears over an item. However I am getting a flickering effect as the mouse is changed to a finger cursor, and then...
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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...

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.