Я хотел бы визуализировать представление «загрузки», когда действие контроллера начинает обрабатывать код, а в конце я хочу вернуть представление в зависимости от результата этого действия
//part of a controller
public async Task Process()
{
//here is where I would like to render the loading view
View("Processing", "Processing");
await ProcessData();
//afterwards I want to either to redirect or ammend the loading view with a new model
//this part works but the loading view never shows
if (successful)
return View("Processing", "Processed successfully");
return Redirect("RedirectUrl");
}
I also tried adding the loading view in its own action and use RedirectToAction but that didn't work either.
Подробнее здесь: https://stackoverflow.com/questions/791 ... ler-method