Wait Cursor

Hello
In my asp.net app, I want to change the cursor to WAIT cursor, while the page is processing. Once the page is loaded , it should turn to default cursor. How can I do this?

Thanks
praveenuniAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

samtran0331Commented:
>>I want to change the cursor to WAIT cursor
Are you talking about the hourglass cursor? It should do that automatically...
praveenuniAuthor Commented:
nope .. its not doing automatically
raterusCommented:
If you were using a technology other than asp.net, I'd tell you to use javascript to change the cursor at the very top of the html, then change it back at the very bottom.

Unfortunately asp.net flushes the entire html all at one time, that is, asp.net creates all the html, THEN starts to send it out.  Unless you have a huge HTML page, I really don't think you can do this and have it work like you'd want it to.  The wait cursor would only be up for a split second.
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

samtran0331Commented:
you're right...the hourglass displays when trying to reach an URL, but if you simply refresh the page or click a button...it doesn't show the hourglass.  I never really noticed!

A cooler solution is to actually show a progress bar.

If you google "asp.net progress bar" or "javascript progress bar"...there are tons of tutorials...some are really fancy looking...

MS has a plain text one as a tutorial:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;837375
entrapnetCommented:
raterus...
yes but thre is a solution... look at the code below

...page_load code behind section
response.write("put ur javascript cmd to change the hour glass cursor")
response.flush <--- this will dump ur javascript to change the cursor first
.... all ur long loading code
response.write("your js to clear the hour glass cursor"

i don't really know what is the javascript for changing the cursor in javascript but i believe raterus will be able to give that.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
raterusCommented:
The problem with that, although I believe it will work on most browsers, is you'll write non-standard code, putting javascript outside <html> tags.  the end product will look like this.

<script language="javascript">
  //Change to Hourglass
</script>
<html>
...
....
...
</html>
<script language="javascript">
  //change back to cursor
</script>

If you're ok with this, and no I don't know the code to change cursor :), you'll have to put the last response.write after the page has been sent to the browser, probably Page_Unload will work.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.