Tyler Adkins
Tyler Adkins

Reputation: 25

ASP.NET AJAX Progress Indication with Async Server Calls

I know this question has been asked before..a lot in fact. But I can't seem to get the wheels turning on this thing. To be honest I'm a bit lost on mating client side and server scripting and the examples I've seen are either far to simplistic or way above my head.

Goal: My goal is to take a long running process I've writtin in VB.NET on the server, which happens to be loop based, and calculate a percentage complete (I know the range of the index values) and relay that back to the user by some means.

Idea: As the loop iterates I want to pass back up to the client an integer of percent complete or poll it from the client.

What I've done: Is very limited, I have little to no experience here, I've been doing a lot of googling and I've played with the UpdatePanel and UpdateProgress controls from AJAX a bit, but this method so far seems to lean towards an idicator, like GIF.

As always any help is appreciated, and if I can answer any questions I will.

Upvotes: 1

Views: 728

Answers (1)

Karl Anderson
Karl Anderson

Reputation: 34844

Have you considered using an inline frame (iFrame) to host your long running process and report back status to the client via the Response object of the long running .aspx page?

If so, then I suggest you read Easy incremental status updates for long requests.

The example uses a button as the display for the progress after the user clicks it, but you could direct output to another DOM element if you wish.

Upvotes: 1

Related Questions