开发者

AJAX: Statusbar: force update of UpdatePanel while function executes

I have a label inside an update panel which I would like to use as a status bar.

Basically the user clicks a button which executes a main function that performs a series of tasks. I'd like to inform the user as to the state of the function as it progresses e.g.:

Stage 1: Retrieving data...

Stage 2: Calculating values...

Stage 3: Printing values...

Stage 4: Done!

I've tried updating the updatepanel directly from the function but it only updates the panel at the end of function (stage 4) and shows "Done!" (which I understand is how it should work).

I've been looking into timers and threads to try and update the panel separate to the main function but I though开发者_Python百科t I'd post here in case anyone has any better ideas?


Have you put an Update Panel around the label as well? Set UpdateMode to conditional, then when executing your stages, set the label's text then updatePanelProgress.Update() should do it

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜