I am trying to download large pdf file from server and server takes some time to generate pdf and respond so request showing as pending.
I need to show spinner when request starts and hide it when request is completed.
How can I accomplish this using JavaScript ASP.NET MVC.
---UPDATE------
Example controller looks like this:
public ActionResult DownloadFile()
{
return File(@"C:\Temp2\HolidayInnReceipt.pdf", "application/pdf", "Report.pdf");
}
---UPDATE------
Here is sample project.