Response.Flush()

  • Thread starter Thread starter fleimeris
  • Start date Start date
F

fleimeris

hello,

private void Page_Load(object sender, System.EventArgs e)
{
this.Response.Write("1<br />");
this.Response.Flush();
Thread.Sleep(5000);
this.Response.Write("2<br />");
}

when i run this page, it just loads for 5 seconds and then displays "1 2". i
want to write it "1", then wait for 5 secs and write "2". how do i do it ?

thanks
 
Probably you have to read more about the working of http and web pages
If you realy want to achieve this you have to do some client side scripting
 
that is not true. after some googling i found this:
"if you dont supply enough characters to the output buffer, it wont flush
(below 200-300 characters)."
and indeed, if i write some longer string instead of "1", the code works.
any further comments are still welcome

viswamitran said:
Probably you have to read more about the working of http and web pages.
If you realy want to achieve this you have to do some client side
scripting.
 
Back
Top