Display "Working" type message

VentureFree

Well-known member
Joined
Jan 9, 2008
Messages
54
Programming Experience
5-10
I'm making a web page for use within my organization (not external so it doesn't have to be pretty) by which certain data can be updated manually in cases where the scheduled updates don't run for whatever reason. The updates can take up to 5 minutes each to run, during which time I would like to display some kind of message like "Working. Please be patient." That way it doesn't just look like the page froze up.

Unfortunately everything I've tried seems to make the message appear after the update runs, rather than before, which is when I need it for obvious reasons. How do I force the page to display the "working" message before the update begins? Even just making an invisible label visible should be enough in this case.
 
It doesn't really have to be. I just want some visible indicator that work is actually being done, even it's just a static "I'm Working" label. The only thing it does right now is show an hourglass cursor, and most people seem to assume that that means it just froze.

I guess what it really simplifies to is how to get the page to display something before it begins running something. As a super simple example, imagine my page wanted to run this for absolutely no good reason at all when someone hits a button:
VB.NET:
Me.lblSleeping.Text = "I'm asleep right now"
Me.lblSleeping.Visible = True
System.Threading.Thread.Sleep(10000)
(sorry if I'm mixing asp and windows improperly, but you get the idea) What I really want to do is make certain that the Label lblSleeping updates and is properly displayed before the page actually sleeps for 10 seconds. Right now, it would sleep for ten seconds and then display the label update. I've tried all kinds of things to make this happen, and nothing seems to work.
 
Back
Top