472,356 Members | 1,909 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,356 software developers and data experts.

Response.flush question

Guys,

I need to send some info to my client while I'm processing some stuff. The flow will be something like :
-process
-response
-process
-response
....

I imagine to use response.flush (as I did on ASP) but it does not work. See my test code, after sending 2 lines on response, I'm simulating a processing time before sending other 2 lines.

Response.Write("Line1<br>")
Response.Write("Line2<br>")
Response.Flush()
Dim i As Double
Do While i < 1000000000
i += 1
Loop
Response.Write("Line3<br>")
Response.Write("Line4<br>")

What hapens is that Line1 and Line2 comes only after processing time..

Ideas?

Thanks

Luiz
Nov 17 '05 #1
5 2416
Response.Buffer = true might be overriding your Flush.

Try something like this

Response.Buffer = false
Response.Write("Line1<br>")
Response.Write("Line2<br>")
Response.Flush()
Dim i As Double
Do While i < 1000000000
i += 1
Loop
Response.Write("Line3<br>")
Response.Write("Line4<br>")

Michael
"Luiz Vianna" <lv*****@multconnect.com.br> wrote in message news:eu***************@TK2MSFTNGP10.phx.gbl...
Guys,

I need to send some info to my client while I'm processing some stuff. The flow will be something like :
-process
-response
-process
-response
...

I imagine to use response.flush (as I did on ASP) but it does not work. See my test code, after sending 2 lines on response, I'm simulating a processing time before sending other 2 lines.

Response.Write("Line1<br>")
Response.Write("Line2<br>")
Response.Flush()
Dim i As Double
Do While i < 1000000000
i += 1
Loop
Response.Write("Line3<br>")
Response.Write("Line4<br>")

What hapens is that Line1 and Line2 comes only after processing time..

Ideas?

Thanks

Luiz
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.536 / Virus Database: 331 - Release Date: 11/3/2003
Nov 17 '05 #2
Are you just testing using localhost as webserver?
This will always be the case.

See http://groups.google.com/groups?hl=e...TF-8&oe=UTF-8&
threadm=OW1teTvjDHA.1764%40tk2msftngp13.phx.gbl&rn um=2&prev=
/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26q%3DRe
sponse.Flush%26meta%3D

for IIS5/IIS6 Flush behavior on a non-local webserver.

- Fred W
"Luiz Vianna" <lv*****@multconnect.com.br> wrote in message news:<eu*************@TK2MSFTNGP10.phx.gbl>...
Guys,

I need to send some info to my client while I'm processing some stuff.
The flow will be something like :
-process
-response
-process
-response
...

I imagine to use response.flush (as I did on ASP) but it does not work.
See my test code, after sending 2 lines on response, I'm simulating a
processing time before sending other 2 lines.

Response.Write("Line1<br>")
Response.Write("Line2<br>")
Response.Flush()
Dim i As Double
Do While i < 1000000000
i += 1
Loop
Response.Write("Line3<br>")
Response.Write("Line4<br>")

What hapens is that Line1 and Line2 comes only after processing time..

Ideas?

Thanks

Luiz
--

Nov 17 '05 #3
In fact I am testing on a web server and not at my own machine.....
"Fred W" <1.***@comcast.net> escreveu na mensagem
news:f8**************************@posting.google.c om...
Are you just testing using localhost as webserver?
This will always be the case.

See http://groups.google.com/groups?hl=e...TF-8&oe=UTF-8&
threadm=OW1teTvjDHA.1764%40tk2msftngp13.phx.gbl&rn um=2&prev=
/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26q%3DRe
sponse.Flush%26meta%3D

for IIS5/IIS6 Flush behavior on a non-local webserver.

- Fred W
"Luiz Vianna" <lv*****@multconnect.com.br> wrote in message

news:<eu*************@TK2MSFTNGP10.phx.gbl>...
Guys,

I need to send some info to my client while I'm processing some stuff.
The flow will be something like :
-process
-response
-process
-response
...

I imagine to use response.flush (as I did on ASP) but it does not work.
See my test code, after sending 2 lines on response, I'm simulating a
processing time before sending other 2 lines.

Response.Write("Line1<br>")
Response.Write("Line2<br>")
Response.Flush()
Dim i As Double
Do While i < 1000000000
i += 1
Loop
Response.Write("Line3<br>")
Response.Write("Line4<br>")

What hapens is that Line1 and Line2 comes only after processing time..

Ideas?

Thanks

Luiz
--

Nov 17 '05 #4
Response.Flush has no meaning if Response.Buffer is false. If buffer is false, then there is nothing to flush, since it is delivered right away.

See my other response for the reason this does not work.

"Michael Pearson" <mi************************@televox.com> wrote in message news:Ou**************@TK2MSFTNGP09.phx.gbl...
Response.Buffer = true might be overriding your Flush.

Try something like this

Response.Buffer = false
Response.Write("Line1<br>")
Response.Write("Line2<br>")
Response.Flush()
Dim i As Double
Do While i < 1000000000
i += 1
Loop
Response.Write("Line3<br>")
Response.Write("Line4<br>")

Michael
"Luiz Vianna" <lv*****@multconnect.com.br> wrote in message news:eu***************@TK2MSFTNGP10.phx.gbl...
Guys,

I need to send some info to my client while I'm processing some stuff. The flow will be something like :
-process
-response
-process
-response
...

I imagine to use response.flush (as I did on ASP) but it does not work. See my test code, after sending 2 lines on response, I'm simulating a processing time before sending other 2 lines.

Response.Write("Line1<br>")
Response.Write("Line2<br>")
Response.Flush()
Dim i As Double
Do While i < 1000000000
i += 1
Loop
Response.Write("Line3<br>")
Response.Write("Line4<br>")

What hapens is that Line1 and Line2 comes only after processing time..

Ideas?

Thanks

Luiz
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.536 / Virus Database: 331 - Release Date: 11/3/2003
Nov 17 '05 #5
In ASP.NET any code in your code-behind is completely processed before the page is delivered to the client machine. This is why flush is not working as it did in classic asp.

In .NET, the client doesn't get the page until the page creation, render and destruction sequence is completed.
"Luiz Vianna" <lv*****@multconnect.com.br> wrote in message news:eu***************@TK2MSFTNGP10.phx.gbl...
Guys,

I need to send some info to my client while I'm processing some stuff. The flow will be something like :
-process
-response
-process
-response
...

I imagine to use response.flush (as I did on ASP) but it does not work. See my test code, after sending 2 lines on response, I'm simulating a processing time before sending other 2 lines.

Response.Write("Line1<br>")
Response.Write("Line2<br>")
Response.Flush()
Dim i As Double
Do While i < 1000000000
i += 1
Loop
Response.Write("Line3<br>")
Response.Write("Line4<br>")

What hapens is that Line1 and Line2 comes only after processing time..

Ideas?

Thanks

Luiz
Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Copa | last post by:
Hello, I am testing buffering an asp page and Flushing information out to the browser, hence i wrote the code in an asp page that follows this Message Post. The loops are suppose to simulate...
7
by: Jon Spivey | last post by:
Experimenting with response.flush() but can't seem to get it to work. This code <% response.write "<p>started</p>" response.flush() for i = 1 to 10000000 i = i +1 next response.write...
9
by: Dominic Godin | last post by:
Hi, I have an asp page that does a lot of processing and reports it's finished by printing the word "Success". For example: <% SomeFunction(SomeVar) SomeFunction(SomeVar1) ...
7
by: Stephanie | last post by:
If response.buffer is set to true, and no response.flush has been executed, is it accurate to expect that my browser should not be rendering the content which I (well Ok, someone else) is sending...
1
by: Dan | last post by:
Hi I've created a generic 'Report' class that takes a DataView from a DataGrid control and writes it out to the response as a csv file for download. Basically, when a user clicks the download...
2
by: David Union | last post by:
Hi. I'm posting this here because I don't know exactly what the best group is. This is for an aspx page with Visual Basic as the code-behind page. I am doing very simple code... in the middle...
3
by: Lars Netzel | last post by:
I want to press a Linkbutton (in a DatagridItem) and return a file that is not shared in the IIS. I want to disallow "deeplinking". The following code works fine (it sends the file I want) but I...
0
by: jose.mendez22 | last post by:
I'm trying to fire a pop-up window before I execute a lengthy stored procedure so I may utilize this window as a status window on number of records executed. After my response.write statements...
12
by: Jim Rodgers | last post by:
I have a big asp file that has an error under certain conditions -- totally repeatable. However, it only fails when I set response.buffer = True at the top. WHen I set it False in order to debug...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
1
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.