In my ASP.Net application, I have a requirement that when a user clicks on a user interface element, we create a PDF file for them that they can download. This is currently accomplished by creating a form post on the ashx page. This page basically checks the form and then runs the correct page on the server side, which either leads to the HTML or PDF document of these HTML pages.
On the client, which I know in advance, if we are going to receive PDF or HTML, when its HTML I open a new window and send a form message to this window, and everything works fine. When its PDF does not change the purpose for the form, it remains on the current page.
This works, the user is presented with a save dialog, and the current page is not changed or lost.
The problem is that PDF generation takes 1 to 15 seconds. What I want to do is a popup, please wait. Displaying the popup will be easy, I'm not sure how to find out how to close the popup? The popup will be the div on the current page.
source
share