我有一个下载按钮,调用这个函数:
public FileResult DownloadExport()
{
string fileName = "example";
// Activate 'In progress'
// Call to a function that takes a while
// Deactivate 'In progress'
return File(fileName, System.Net.Mime.MediaTypeNames.Application.Octet, Path.GetFileName(fileName));
}
因此,我调用一个生成文件的函数。这个函数需要一些时间,我不希望用户认为应用程序崩溃了。这就是为什么我想在用户等待时显示“进行中”的原因。我该如何实现这个功能呢?
澄清一下:这个问题并不是关于下载进度的,而是关于生成文件的进度。