Pause and catch up?

Hi:

I am returning to my app from PayPal. Ideally I would like to display a page of information that pertains to what the user ordered, with perhaps a progress bar, while the app prepares a report and emails it to them. This can take a couple of minutes.

However, my app skips past the display, and goes right to preparing the report. All the user sees after returning from PayPal is a screen that says my app is loading. It continues to show this even after the report has been successfully emailed.

I am thinking that I somehow need to pause the program so that it can catch up with itself. I tried putting in a counter loop, and this did not help.

Any ideas?

You should ideally spin that report task off in a separate process. You want to avoid long running tasks in web applications because it prevents any users from using the application, not just the user waiting for the report.

With Phillip Z.'s suggestion, I looked for a control that didn’t require any action by the user. I tried the timer control and it did the trick. Thanks.