Flush Method

Transmits the current response to the server that forwards it to the browser or to another client. Response.Flush() can only be called once per request.

Syntax

Response.Flush()

Note

Once Response.Flush() has executed, the user can view the results page in the browser; the server terminates the connection both to the client and to AFP. The current AFP page will execute, although all output, HTTP headers and cookies generated following Response.Flush() will be ignored.

Normally, you use Response.Flush() every time a web page starts a longer process like generating a PDF report or importing data. With the aid of Response.Flush() you can transmit a response to the user even before the process has started. This response may have a link to a file yet to be created, it may repeatedly test if the process has been completed or it may simply inform the user of the fact that the process is executing.