Hi,
I have business requirement, wherein I need to start a report generation procedure on click of a button. The report generation process should complete within 120 seconds. If the report doesn't generate within that time frame, I need to pop up a javascript
message to the user asking him/her whether s/he would like to receive the report by email. If the user OKs the dialog, then the application proceeds to send the report to the user as an attachment after it is generated. In order to check for the threshold
of 120 seconds, I am using a System.Timers.Timer object. Following is a rough outline of my code
I declare the timer object and a boolean public property signifying whether the report is generated at the top of the class
System.Timers.Timer timer = new System.Timers.Timer(120000); // timer is initiated with an interval of 120 seconds
public bool ReportGenerated { get; set; }
Page load event
< ...
Go to the complete details ...