MVC 4 Webapp, JQuery
I want to show the progress of a lenghty procedure.
the following gets called from JSON which takes several seconds...
Basically, what I would like to do is:
[HttpPost]
public JsonResult Update(var x)
{
return Json(new { Result = "Working", Message = "Waiting on Server" });
var y = contactAnotherServer(x);
return Json(new { Result = "Working", Message = "Crunching Data" });
var finished = doSomethingWithData(y);
return Json(new { Result = "OK", Message = "Done" });
}
Obviously this would terminate on the first return-statement.
How would this be done ?
Thank you!