Here's a use case:
- I'm using ASP .NET Web Forms 3.5 & jQuery
- On the web page, I initialize a javascript request to the server (eg. DoAsyncTask.aspx)
- On the server I take advantage of RegisterAsyncTask. Inside registered asynchronous task, I write info about the progress directly to Response output stream, like this:
// Called when task starts in order no to buffer the output
Response.BufferOutput = false;
Writing single progress message looks like this (please comment on it as well, as it works almost as I want):
Response.Write(message + Environment.NewLine);
Response.OutputStream.Flush();
It works nice (almost) when I initialize request to DoAsyncTask.aspx from browser (I can see single line messages comming from the server). (I works almost nice because sometimes single lines I get from the server are truncated - propably browser buffering???)
But I don't know how to do it with client side & jQuery. What I would like to do on client side, is to display flushed messages in some kind of element (like ) as they come from the server. How can I do it?