public JsonResult DoProcess(List<string> data) { foreach (string str in data) { try { System.Threading.Thread.Sleep(2000);// process complete++; //global variable initialize with zero. if (complete == data.Count) isComplete = true; } catch (Exception ex) { var error = new ErrorList { ErrorMessage = ex.Message }; complete++; if (complete == data.Count) isComplete = true; errors.Add(error); } } return Json(errors); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)