Flushing the Buffer in .Net

Discussion in 'ASP .Net' started by Eric, Apr 25, 2004.

  1. Eric

    Eric Guest

    Good afternoon,

    Can anyone help me with flushing the buffer in ASP.NET. I have a set of
    functions that perform a series of maintainence operations. As these
    functions are called sequentially, each contains a status as to the success
    or failure of the particular process. I want to be able to send to the
    client each output string at it happens. The way it is working right now is
    that it is storing the output until all of the functions are complete.

    Many thanks.
     
    Eric, Apr 25, 2004
    #1
    1. Advertising

  2. Eric wrote:
    > Can anyone help me with flushing the buffer in ASP.NET. I have a set of
    > functions that perform a series of maintainence operations. As these
    > functions are called sequentially, each contains a status as to the success
    > or failure of the particular process. I want to be able to send to the
    > client each output string at it happens. The way it is working right now is
    > that it is storing the output until all of the functions are complete.


    Have you tried putting Response.Flush() after each function has
    completed processing? Technical docs for this method available at:
    http://msdn.microsoft.com/library/d...frlrfSystemWebHttpResponseClassFlushTopic.asp

    Happy Programming!

    --

    Scott Mitchell

    http://www.4GuysFromRolla.com
    http://www.ASPFAQs.com
    http://www.ASPMessageboard.com

    * When you think ASP, think 4GuysFromRolla.com!
     
    Scott Mitchell [MVP], Apr 25, 2004
    #2
    1. Advertising

  3. Eric

    Bruce Barker Guest

    turn off page buffering

    Page.Response.BufferOutput = false;

    then use a flush to ouput the message

    Page.Response.Flush();

    be sure your markup is simple, or the browser will not render it, but wait
    for the complete page.

    -- bruce (sqlwork.com)


    "Eric" <> wrote in message
    news:...
    > Good afternoon,
    >
    > Can anyone help me with flushing the buffer in ASP.NET. I have a set of
    > functions that perform a series of maintainence operations. As these
    > functions are called sequentially, each contains a status as to the

    success
    > or failure of the particular process. I want to be able to send to the
    > client each output string at it happens. The way it is working right now

    is
    > that it is storing the output until all of the functions are complete.
    >
    > Many thanks.
    >
    >
     
    Bruce Barker, Apr 25, 2004
    #3
  4. Eric

    Eric Guest

    The Page.Response.BufferOutput did the trick....

    As the status information is added it eventually outgrows the status
    textbox, is there any way to scroll the text box as each item is entered so
    the user sees the latest process completed?

    Many thanks.


    "Bruce Barker" <> wrote in message
    news:...
    > turn off page buffering
    >
    > Page.Response.BufferOutput = false;
    >
    > then use a flush to ouput the message
    >
    > Page.Response.Flush();
    >
    > be sure your markup is simple, or the browser will not render it, but wait
    > for the complete page.
    >
    > -- bruce (sqlwork.com)
    >
    >
    > "Eric" <> wrote in message
    > news:...
    > > Good afternoon,
    > >
    > > Can anyone help me with flushing the buffer in ASP.NET. I have a set of
    > > functions that perform a series of maintainence operations. As these
    > > functions are called sequentially, each contains a status as to the

    > success
    > > or failure of the particular process. I want to be able to send to the
    > > client each output string at it happens. The way it is working right

    now
    > is
    > > that it is storing the output until all of the functions are complete.
    > >
    > > Many thanks.
    > >
    > >

    >
    >
     
    Eric, Apr 26, 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. arnuld
    Replies:
    5
    Views:
    810
    =?ISO-8859-1?Q?Erik_Wikstr=F6m?=
    Mar 18, 2007
  2. Ethan Metsger

    Decorators and buffer flushing

    Ethan Metsger, Feb 28, 2008, in forum: Python
    Replies:
    0
    Views:
    292
    Ethan Metsger
    Feb 28, 2008
  3. Andyza

    Flushing servers buffer

    Andyza, Jul 6, 2005, in forum: ASP General
    Replies:
    3
    Views:
    145
    Andyza
    Jul 7, 2005
  4. tj
    Replies:
    2
    Views:
    164
    Walter Roberson
    May 4, 2004
  5. Nigel

    Problems flushing my buffer! (perl)

    Nigel, Oct 3, 2008, in forum: Perl Misc
    Replies:
    14
    Views:
    251
    Jim Gibson
    Oct 7, 2008
Loading...

Share This Page