PDA

View Full Version : Progress bar with backend update in MVC



elector
Jan 04, 2023, 2:53 PM
Is there an example where I can see Progress bar with backend controller update?

fabricio.murta
Jan 07, 2023, 4:30 PM
Hello, @Elector!

It probably depends on what exactly you mean with "backend controller update". As far as updates coming from the server are concerned, this example should cover it:

- Progress Bar: Server-side updates (https://examples5.ext.net/#/Miscellaneous/ProgressBar/Server_Side_Update/)

This basically highlights the use of the WebForms' TaskManager feature to easily "time" the direct event calls. The same could be achieved by adding a timed callback to the task starter's DirectEvent (or DirectMethod) trigger.

Hope this helps!

elector
Jan 08, 2023, 9:07 AM
Thank you Fabrizio but the problem is that, when I tried to translate this to MVC, it didn't work.
First I couldn't add Resource Manager to the page with the progress bar because there is one on the base layout page, Resource manager does not have an ID property so I can't name it, I am not sure if I handled the UI controls well from the controller code, I couldn't use threading as it is in the example... I can't tell you how many things are different and don't work in MVC.
That is why I was asking so a concrete example in MVC, because it is so much different.

Thanks

fabricio.murta
Jan 09, 2023, 5:18 PM
Hello again, @elector!

As far as an example in MVC using the feature is concerned, you could check the test case #5 in the Message Box Overview example in MVC Examples explorer.

Unfortunately the live site is down at the moment, but you can always check the project by yourself by cloning and building from its GitHub project page (https://github.com/extnet/mvc.ext.net/).

The example in question is available at src/Areas/MessageBox_Basic (https://github.com/extnet/mvc.ext.net/tree/5.3.0/src/Areas/MessageBox_Basic). See the view and respective controller, the logic is in the topic #5 within the example.

Hope this helps!

elector
Jan 10, 2023, 6:49 AM
Thank you very much Fabrizio, this seems like an example that can help.
Let me give it a try in my code.
I appreciate your help!

elector
Jan 10, 2023, 7:18 AM
It works! You're a star! Thank you!

annymarry
Feb 01, 2023, 3:14 AM
A Progress Bar is used to show the progress of a task, so probably your task is number of file's lines. (https://gbmod.net/download-gbwhatsapp-apk/) here it may help you
https://stackoverflow.com/questions/73266163/update-view-progress-bar-from-controller-c-sharp-asp-net-mvc