title: How to show 'in progress' while a FileResult function is running in MVC4
body: <p>I have a download button that calls this function: </p>
  
  <pre><code>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));
  }
  </code></pre>
  
  <p>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?</p>
  
  <p>For clarification: This question is <strong>not</strong> about the progress of the download, but about the progress of the function generating the file.</p>