Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Flushing servers buffer

Reply
Thread Tools

Flushing servers buffer

 
 
Andyza
Guest
Posts: n/a
 
      07-06-2005
In the following code when i = 500 the buffer on the server is flushed
to the client. However, because the content that is sent to the browser
contains an html table Internet Explorer does not display the table
until it receives the closing </table> tag. The question is, am I
correct in saying that the buffer on the server is CLEARED when i =
500? It will be empty for a split second until the loop resumes again.
Am I correct?

Dim i
i = 1
Response.Write("<table>")
For i = 1 to 1000
Response.Write("<tr><td>" & i & "</td></tr>")
i = i + 1
If i = 500 Then
Response.Flush()
End If
Loop
Response.Write("</table>")

Is this a good way to clear the buffer if I'm processing a very large
amount of data?

 
Reply With Quote
 
 
 
 
CJM
Guest
Posts: n/a
 
      07-06-2005

"Andyza" <> wrote in message
news: oups.com...
> In the following code when i = 500 the buffer on the server is flushed
> to the client. However, because the content that is sent to the browser
> contains an html table Internet Explorer does not display the table
> until it receives the closing </table> tag. The question is, am I
> correct in saying that the buffer on the server is CLEARED when i =
> 500? It will be empty for a split second until the loop resumes again.
> Am I correct?


See:
http://www.intellidimension.com/defa...onse_flush.rsp

It suggests that a Flush() call clears the buffer...

CJM


 
Reply With Quote
 
 
 
 
Andyza
Guest
Posts: n/a
 
      07-07-2005
The Flush() method requires Response.Buffer to be set to False.
When Response.Buffer = False any output gets sent back to the client as
the server completes it's processing (as opposed to being cached on the
server until all the processing is complete), so Response.Flush isn't
required.

Guess I should have read this first:
http://msdn.microsoft.com/library/de...9548d3f8b0.asp

 
Reply With Quote
 
Andyza
Guest
Posts: n/a
 
      07-07-2005
Andyza wrote:
> The Flush() method requires Response.Buffer to be set to False.


Ok, ok, I should have read what I posted... The Flush() method requires
Response.Buffer to be set to TRUE.
Then when the Flush() method is called the output gets sent back to the
client.

>
> Guess I should have read this first:

<snip>

Guess I should have checked the url too! The correct one is:
http://msdn.microsoft.com/library/en...e01af7e6cb.asp

 
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
Decorators and buffer flushing Ethan Metsger Python 5 03-03-2008 05:06 PM
Decorators and buffer flushing Ethan Metsger Python 0 02-28-2008 05:49 PM
Accelerated C++ - Chapter 1, confusion in understanding "flushing the buffer" arnuld C++ 5 03-18-2007 11:14 AM
stdin - flushing buffer - this should be an easy one tj Perl Misc 2 05-04-2004 08:55 PM
Flushing the Buffer in .Net Eric ASP .Net 3 04-25-2004 11:23 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