Response.buffer doesnt work

Discussion in 'ASP General' started by Copa, Aug 21, 2003.

  1. Copa

    Copa Guest

    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 long search processes with a flush after
    each search.
    When i Navigate to the page, redirect to it from another page, or type the
    URL to this page in the browser, the page is buffered until it reaches the
    end of the file and is then displayed all at once instead of being flushed
    at the appropriate interval i set. If i then right click in IE 6 and click
    'refresh' then sometimes the page actually buffers out one text box about
    every 5 seconds which would be correct, but this doesnt happen everytime.
    It only seems to flush about 50% of the time, and only if I manually click
    refresh.

    If i change the response.buffer to equall False and remove the Flush
    statements, hence it should display as it is processed, the browser still
    doesnt display the page until the entire asp file is processed.

    Can anyone tell me what i am doing wrong or if i have something set wrong.

    I have Internet Information server 5.1 installed, the option for Buffering
    is turned on, as does this page reaffirm that.

    Regards,
    Daniel Copa
    Georgia Farm Bureau


    <%@ Language=VBScript %>
    <%
    Response.Buffer =True
    %>
    <HTML>
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    </HEAD>
    <%
    dim i, x

    For i = 0 To 65526
    For x = 0 To 200
    next
    Next
    for i = 0 to 1000
    Response.write i
    next
    Response.write "<INPUT id=hTotalItems name=hTotalItems value=""3""><BR>"
    Response.Flush

    For i = 0 To 65526
    For x = 0 To 200
    next
    Next
    for i = 0 to 1000
    Response.write i
    next
    Response.write "<INPUT id=hItem1 name=hItem1 value=""1""><BR>"
    Response.Flush


    For i = 0 To 65526
    For x = 0 To 200
    next
    next
    for i = 0 to 1000
    Response.write i
    next
    Response.write "<INPUT id=hItem2 name=hItem2 value=""2""><BR>"
    Response.Flush


    For i = 0 To 65526
    For x = 0 To 200
    next
    Next
    for i = 0 to 1000
    Response.write i
    next

    Response.write "<INPUT id=hItem3 name=hItem3 value=""3"">"
    %>
    </BODY>
    </HTML>
    Copa, Aug 21, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Sm9l?=

    Response.Buffer vs. Response.BufferOutput

    =?Utf-8?B?Sm9l?=, Oct 24, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    9,182
    Vadivel Kumar
    Oct 25, 2005
  2. Replies:
    3
    Views:
    420
    alex23
    May 27, 2008
  3. dave

    Response redirect Doesnt Work

    dave, Nov 26, 2003, in forum: ASP .Net Security
    Replies:
    4
    Views:
    122
    Raj Lealh
    Nov 30, 2003
  4. gabriel
    Replies:
    2
    Views:
    597
    gabriel
    Aug 3, 2005
  5. xingye
    Replies:
    9
    Views:
    260
    Michael Lu
    Apr 19, 2004
Loading...

Share This Page