Reputation: 91845
In my ASP.NET MVC application, one of my actions is going to take a while -- it kicks off a sequence of other tasks. I'd like to report progress to the user. I want to display text -- I don't want a simple progress bar or spinner.
How should I go about doing the two parts? First, how do I display progress to the user? Second, how should I implement the action so that progress is available to the user?
Upvotes: 1
Views: 228
Reputation: 91845
I'm doing some playing around, and currently I've got the following in mind:
I'll probably pass a Job ID to GetProgress, and use this to identify which background thread I'm asking about.
Upvotes: 1
Reputation: 47597
My ideas:
Create controller method, which returns JSON:
{
"Message" : "Processing something serious",
"Percentage" : "43"
}
Handle it through JS - put message span & bar indicator in seperated div, change it's content.
For progress bar i would use this one.
Upvotes: 2
Reputation: 32085
I started of writing a response but then I realized I should just redirect to the Progress Indicator AJAX pattern resource. It has a comprehensive yet concise discussion of the problems, solutions, usability considerations and other interesting details.
Upvotes: 1