I have a simple C # ASP.NET application that generates an Excel file and sends it to the browser using the Response.WriteFile () function.
I would like to disable the submit button when it was pressed, and display a message on the screen to wait a few minutes, as some of the files may take some time to generate. This works fine, but I canโt figure out how to reactivate the button or even refresh the page after the file is uploaded. The page remains in the "Wait ..." offline state, even when it ends.
I thought that synchronous AJAX calling with additional javascript commands would subsequently work, but although the file is actually generated, it never gets sent to the browser. I also tried using an iframe control, but cannot find a way to reliably know when a new file will be loaded in it.
Thanks in advance to everyone who can help!
UPDATE: I found a possible solution at http://code.msdn.microsoft.com/AjaxFileDownload , which is great for loading existing files, but when I call the page that generates the file and ends with Response.End (), the event " Ready download "never works.
source share