Reputation: 93
I have a label control in an updatepanel called lblStatus. I have the follwing code in my codebehind:
for x = 0 to 100
lblstatus.text = x
Threading.Thread.Sleep(1000)
updatepanel.update
next
I cannot seem to get the status to show. It only shows the last number once the loop is complete. Please help.
Upvotes: 0
Views: 48
Reputation: 700820
You can't update an update panel in a loop. The updates for the page isn't sent to the browser until the response is complete on the server, so you can only do one update for each request to the server. Your code will simply change what the update will be several times, and the final update is then sent to the browser when the server code ends.
Upvotes: 2