A lengthy server process updating a client-side shortcut. AJAX ASP.Net

I have a long process on the server side (it receives data through the web service in packages as part of the do / while loop). On each pass through the loop, I want to send a status message back to the label control in the update panel on the client.

I tried to assign a value to the label in the code behind, and then use a timer to update the update panel every minute. But that does not work.

Any ideas or suggestions?

TIA

+3
source share
4 answers

jQuery.get , , , . . , , ( ) ... , . , http ... !

+1

. /. LongRunningTask, ((LongRunningTask)Cache["MyLongRunningTask"]).TaskStatus - ( - =))

+1

.

. Response.Write , . I.E.: 234

answer.write Response.Flush. .

0

Write Flush a

<script>
  /* jquery to update an element on the client page */
</script>

. , , , (, 1000 ). . , script , , , (,.... 10 ), .

0

Source: https://habr.com/ru/post/1713707/


All Articles