I have a download button that calls this function:
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));
}
So, I call a function that generates a file for me. This function takes a while and I don't want my users to think the application crashed. That's why I want to show 'In progress' while the user is waiting. How can I implement this?
For clarification: This question is not about the progress of the download, but about the progress of the function generating the file.