I have an Import function for an Excel spreadsheet within an application. It uses the FileUpload control at the moment. I upload the file, then run an operation on that file. I want to inform the user of the operation being done, and the percentage that is done. I figure that I can take the total number of rows I extracted from the Excel spreadsheet, and continuously divide as I insert each record into the database and update a progress bar.
The problem is that I can't seem to find any solution that updates a progress bar from the Code Behind. I tried using Matt Berseth's solution:
http://mattberseth.com/blog/2008/06/aspnet_ajax_progressbar_contro.html
It's very nice to look at, but I can't see to get it working from the Code Behind. Theoretically, I figured that putting a value into a textbox on the page, and setting the onchange to a Javascript function to set the percentage would work as a test, but even that didn't give me the desired results.
Any suggestions as to how this can be done?