Change label text while running a loop on the server

Asked

Viewed 160 times

1

I have a screen that does a lengthy processing, and there’s a for that each next, I want to set a label for the user to see the process.

I know it can be done by ajax, but I haven’t found anything as an example. Anyone can help?

  • You could use a progress bar and display %, it serves ?

  • Is it Webforms or MVC? C# or VB?

  • is Vb, web. But can send suggestions c# I convert...

  • Hello, Try using this here. http://www.singingeels.com/Articles/RealTime_Progress_Bar_With_ASPNET_AJAX.aspx

  • I’ll give you a read Paul, then comment again if it worked.

  • Paulo, I downloaded the project, ran but it doesn’t work... it gets static and not dynamic as I would like.

Show 1 more comment

1 answer

0


I know it wasn’t the best solution, but I needed to be fast and as I had already turned the google and nothing helped I decided to do this way.

On the processing screen, where you have the loop, on the button click, I call a Javascript Function that opens a popup and the server onclick remains the same. In loop I Seto the status in application, in how many % and some more information. In the new popup I have a Timer that requires (Ontick) every 10 seconds. In the method he requests, I regain the status of application and Row on the screen.

That is, every 10 seconds you update to the user how the processing is.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.