Do Events

Discussion in 'ASP General' started by Popeye, Oct 8, 2004.

  1. Popeye

    Popeye Guest

    Is there a command within ASP similar to the Do Events command in VB6. The
    problem I have is that an asp page that I have written outputs many lines
    after extracting data from WMI. In total there are about 1000 lines
    generated which are displayed within the browser and saved to a database.

    The browser displays the correct results and they are saved into the
    database. But the browser only displays the results after it has completed
    the entire script. Is it possible to get it to output lines before
    continuing with the rest of the script so I can display a section at a time.

    Paul
    Popeye, Oct 8, 2004
    #1
    1. Advertising

  2. The default setting in >= IIS 5.0 is the buffer all the response text,
    meaning that no response is sent to the client until all the server-side
    processing is finished. You can either turn off buffering for that page
    (Response.Buffer = False), change it globally for the site or application,
    or just use Response.Flush in your code.

    <%

    do while doing something that takes a really long time
    '''code, code, code
    Response.Flush
    '''code, code, code
    Loop
    %>

    Ray at home

    "Popeye" <> wrote in message
    news:04l9d.4693$...
    > Is there a command within ASP similar to the Do Events command in VB6. The
    > problem I have is that an asp page that I have written outputs many lines
    > after extracting data from WMI. In total there are about 1000 lines
    > generated which are displayed within the browser and saved to a database.
    >
    > The browser displays the correct results and they are saved into the
    > database. But the browser only displays the results after it has completed
    > the entire script. Is it possible to get it to output lines before
    > continuing with the rest of the script so I can display a section at a
    > time.
    >
    > Paul
    >
    Ray Costanzo [MVP], Oct 8, 2004
    #2
    1. Advertising

  3. Ray Costanzo [MVP] wrote:
    > do while doing something that takes a really long time
    > '''code, code, code
    > Response.Flush
    > '''code, code, code
    > Loop


    Another factor to consider is browser behavior. Some browsers (IE in
    particular) don't like to display tables until they are closed. A
    Response.Flush() for each row of a table will produce no improvement for the
    IE user (Gecko-based browsers handle this just fine, FWIW).



    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
    Dave Anderson, Oct 8, 2004
    #3
  4. Popeye

    Popeye Guest

    Thanks for this I got it to work fine in the end.

    Regards
    Paul

    "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    message news:...
    > The default setting in >= IIS 5.0 is the buffer all the response text,
    > meaning that no response is sent to the client until all the server-side
    > processing is finished. You can either turn off buffering for that page
    > (Response.Buffer = False), change it globally for the site or application,
    > or just use Response.Flush in your code.
    >
    > <%
    >
    > do while doing something that takes a really long time
    > '''code, code, code
    > Response.Flush
    > '''code, code, code
    > Loop
    > %>
    >
    > Ray at home
    >
    > "Popeye" <> wrote in message
    > news:04l9d.4693$...
    >> Is there a command within ASP similar to the Do Events command in VB6.
    >> The problem I have is that an asp page that I have written outputs many
    >> lines after extracting data from WMI. In total there are about 1000 lines
    >> generated which are displayed within the browser and saved to a database.
    >>
    >> The browser displays the correct results and they are saved into the
    >> database. But the browser only displays the results after it has
    >> completed the entire script. Is it possible to get it to output lines
    >> before continuing with the rest of the script so I can display a section
    >> at a time.
    >>
    >> Paul
    >>

    >
    >
    Popeye, Oct 8, 2004
    #4
    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. shiv
    Replies:
    0
    Views:
    467
  2. Alvin Bruney
    Replies:
    1
    Views:
    713
  3. =?Utf-8?B?bG91aXNlIHJhaXNiZWNr?=

    order of events - dynamic checkbox events

    =?Utf-8?B?bG91aXNlIHJhaXNiZWNr?=, Aug 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    555
    =?Utf-8?B?bG91aXNlIHJhaXNiZWNr?=
    Aug 17, 2005
  4. newbye
    Replies:
    0
    Views:
    573
    newbye
    Jul 6, 2006
  5. Chris

    Events Events Events Please Help

    Chris, Aug 30, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    341
    Chris
    Aug 30, 2005
Loading...

Share This Page