Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Display text before ending the script

Reply
Thread Tools

Display text before ending the script

 
 
andre.labonte@gmail.com
Guest
Posts: n/a
 
      10-27-2006
Hi!

I have a script that is taking some time to run and in my page, i've
placed some comments to be displayed on the webpage so I can know what
the script is currently running.
Unfortunately, the HTML page is displayed ONLY when the script is
entirely finished.
I'd like the comments placed within the script to be displayed as soon
as the script is reading them, not at the end!

(I don't know if i'm clear enough, here's an example)

CURRENTLY:

(script running)
....
(script end)
HTML page will show:
The script is starting...
Script step 1...
Script step 2...
Done!


WHAT I'D LIKE IT TO DO:

(script running)
The script is starting...
(script continues)
Script step 1...
(script continues)
Script step 2...
(script end)
Done!

Thanks!
Andrew

 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      10-27-2006
wrote:
> Hi!
>
> I have a script that is taking some time to run and in my page, i've
> placed some comments to be displayed on the webpage so I can know what
> the script is currently running.
> Unfortunately, the HTML page is displayed ONLY when the script is
> entirely finished.
> I'd like the comments placed within the script to be displayed as soon
> as the script is reading them, not at the end!
>


You need to turn the response buffer on and, when you want the output
sent to the client, flush the buffer

Response.Buffer = True
....
Response.Flush
....
Response.Flush

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sopranos real ending (video) leaked; run before removal! Waldo Lydecker Digital Photography 11 06-24-2007 09:55 PM
how to capture onerror without ending script blocks Tobius Javascript 3 03-29-2006 05:11 AM
CHtmlView: How to read html text before display, change and give to display changed html code? Marek Kurowski C Programming 1 08-18-2004 06:41 PM
how to wait for active servlets before ending session? Mohun Biswas Java 2 04-15-2004 08:40 PM
Re: ASPNET Session ending before time Thomas Bindzau ASP .Net 0 06-24-2003 03:32 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57