How can I update a progress bar from the codebehind of the page?
Posted on 2009-04-29
I have a client page that iterates through a number of records. I want to display a progess bar to the user. I have an AJAX update panel and a timer instantiated on the form with a label control in the update panel. I have a timer.tick event handler defined in the codebehind. I thought that when the timer event fired, the tick event handler would update the label with the currrent percent complete statistic and the update panel box would show the result.
Alas, nothing happens. I must be missing something simple. All the examples of progress bars I've seen seem much more complicated. I have to admit however, its not clear to me how the code behind, while executing the for loop, can handle the tick event and do a partial page postback. What am I missing, and how can I accomplish this?