ASP -response-flush-flushes-partial-data

Posted by Anshu on Programmers See other posts from Programmers or by Anshu
Published on 2012-06-29T16:10:27Z Indexed on 2012/06/29 21:23 UTC
Read the original article Hit count: 294

Filed under:

I am developing a web app with an ASP server side and I use an iframe for data push.

An ASP handler flushes every once in a while some javascript to the iframe:

context.Response.Write("<script language='javascript'>top.update('lala');</script>");
context.Response.Flush();

My problem is that sometimes, when I receive the data, I don't get the full text. For example I will receive this : update('lala');

One workaround I have is to have a thread flushing '..........' every 500ms. (Then I will receive script>...... which will complete my javascript.)

However I am sure there must be a way to have Response.Flush() sending the whole chunk of data. Does someone have an idea on how to use properly Response.Flush() ?

Thank you!

© Programmers or respective owner

Related posts about ASP.NET