Flushing servers buffer

A

Andyza

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?
 
C

CJM

Andyza said:
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/def...dfgateway/reference/script/response_flush.rsp

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

CJM
 
A

Andyza

Andyza said:
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-us/iissdk/html/afd29638-af17-4c29-b285-95e01af7e6cb.asp
 

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,754
Messages
2,569,522
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top