I have a form on my web page, it allows to submit many queries to my website, every query is on a separate line 开发者_Python百科in TextArea. Because waiting for all queries to complete is too long I would like to update the web page after every query completes - send result of one query to a web browser, new result should be appended to old results that are already on the web page.
How to do this in ASP.NET MVC 2?
I will be grateful for helpful responses.
Update
Thank you for all your answers but I decided to use JavaScript in web browser to poll server for data, here is my question about it Can't disable jQuery cache
Read about Comet
Some projects from codeplex:
- ncomet
- pokein
I would just flush using Response.Flush()
each time when you complete part of the request.
Checkout HTTP Server Push or Long Polling.
or this SO question on HTTP Streaming...
Cross-browser implementation of "HTTP Streaming" (push) AJAX pattern
Examples of Long Polling with generic code.
How do I implement basic "Long Polling"?
https://stackoverflow.com/questions/tagged/long-polling
精彩评论