0

Not sure if I'll explain this properly but here goes. I having written an asp.net app using C# for the code behind. After the user makes some selection and hits the "run" button I pass off the processing to a dll written in C# but what I want is a way to periodically send information back to the client so they can see what's going on like how many records have been processed and things like that. How can I accomplish this?

thanks

kervin
  • 11,672
  • 5
  • 42
  • 59
user204588
  • 1,613
  • 4
  • 31
  • 50

4 Answers4

1

Have a look at Provide feedback to the user on Long Running Tasks – using loader image - MS AJAX and JQuery

Also: How Do I: Use the ASP.NET AJAX UpdateProgress Control?

Mitch Wheat
  • 295,962
  • 43
  • 465
  • 541
  • Neither of those solutions provide feedback from the server during the operation, do they? Aren't they just showing a loader image (such as an animated "in progress" graphic) to the client, while waiting for the server to respond? – RickNZ Nov 29 '09 at 07:58
  • it doesn't sound like this is the solution. It sounds like RickNZ says to just show that the server is processing but no feedback. – user204588 Nov 29 '09 at 09:29
  • 1
    did you take a look at the second part of the article in the first link? – Mitch Wheat Nov 29 '09 at 10:51
0

There are many ways of accomplishing this kind of task. I am presenting a few ideas

Solution 1:

You can use Ajax Timer Control.

Solution 2:

Make a Windows Service that will read the information and will interact with the asp.net application to notify about the requested information. It will act as a background worker.

Hope this helps

priyanka.sarkar
  • 25,766
  • 43
  • 127
  • 173
0

This may have been my wording of the question but I found what I was looking for. You can use the HttpResponse.Flush method to achieve what I was trying to do.

user204588
  • 1,613
  • 4
  • 31
  • 50
0

This is often called HTTP Server Push or HTTP Streaming or Long Polling. Depending on how it's done.

You can also check out this SO question on HTTP Streaming...

Cross-browser implementation of "HTTP Streaming" (push) AJAX pattern

Or this one with an example of Long Polling

How do I implement basic "Long Polling"?

https://stackoverflow.com/questions/tagged/long-polling

Community
  • 1
  • 1
kervin
  • 11,672
  • 5
  • 42
  • 59