Please Wait Functionality ?

L

localhost

I have a page that takes a long time to process. I would like to
display a <div> for the client at the beginning of the page load, and
then when processing is complete get rid of the div and display my
page.

In my Page_Load:

HttpContext.Current.Response.Write(
"<div id=\"divSmartRemark\" style=\"position:absolute;
overflow:visible; text-align:center; width:240px; height:182px;
z-index:1; left:25; top:18;font-family:Tahoma; font-size:10pt;
font-weight:bold; color: red;
background-color:#FFFFFA\"><br/><br/><br/> please wait </div>");

Now what can I do to get rid of that by the time the page is otherwise
fully rendered?

Thanks.
 
M

Martin Dechev

The problem with your design is that the response is buffered until the page
is processed completely. And there is nothing you can do to change this.

What you can try to do is write the "Please Wait" message before the request
is sent and hope that the browser will not replace it with blank page during
the processing of the request.

Greetings
Martin
 
K

Kevin Spencer

As this issue comes up about once or twice a day, I would recommend
searching this newsgroup for pervious postings on the subject, and seeing
what has already been suggested.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
S

Steven Cheng[MSFT]

Thanks for Martin and Kevin's suggestions.


Hi Localhost,

Thanks for posting in the community! As Kevin as mentioned, there're some
former posts discussing on such issue and here is one of them's web link in
google:


#Subject: Problems with Asynch Processing in ASP.Net
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=2qsKzk94
DHA.1512%40cpmsftngxa07.phx.gbl&rnum=1&prev=/groups%3Fq%3Dasynchronous%2Bste
ven%2Bcheng%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26start%3D0%26sa%3DN

And here are some good tech articles mentioned in it. You may view them
directly via the following links:

#DESIGN PATTERNS: Asynchronous Wait State Pattern in ASP.NET
http://msdn.microsoft.com/msdnmag/issues/03/12/designpatterns/default.aspx

#Make a Progress Indicator For Slow-Loading Pages
http://www.aspnetpro.com/NewsletterArticle/2003/08/asp200308bm_l/asp200308bm

Hope these help.



Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top