Last post Nov 06, 2014 11:55 PM by Zhi Lv - MSFT
Oct 31, 2014 02:45 PM|nvielbig|LINK
I have a method, GenerateReport, which is located in a separate project in my solution. Basically, it populates some objects, populates an excel sheet, saves the excel sheet, etc. However, this report can take a bit to generate, so I'm looking to add in
some progress information for the user. I have a dialog that displays while the GenerateReport method is running, however, I do not know how to return any information to my Page's code-behind, as this one method handles everything.
Essentially, say every second, I want to be able to say GetReportStatus() or something, which will return to me whatever I would like, but GenerateReport may or may not yet be completed. Please let me know if you can't understand my question.
thanks in advance.
Oct 31, 2014 04:15 PM|UstesG|LINK
you can a Public event in your GenerateReport Class,
Public Event ShowProgress(msg as string)
then declare this class withevents. Within your Generate
private withevents rptgen as new ReportGenClass
then within the ShowProgress event update your gui.
Nov 06, 2014 11:55 PM|Zhi Lv - MSFT|LINK
From your description, I suppose you want to display some progress information. If that is the case, I suggest you could use Ajax UpdatePanel and UpdateProgress Control.
If a page contains
UpdatePanel controls, you can also include
UpdateProgress controls to keep users informed about the status of partial-page updates. You can use one
UpdateProgress control to represent the progress of partial-page updates for the whole page.
For more details please refer to this link: