Home Dynamically push data to a razor view in MVC Core while the controller is still processing
Reply: 0

Dynamically push data to a razor view in MVC Core while the controller is still processing

David Covey
1#
David Covey Published in 2017-12-07 19:35:42Z

I am trying to create a razor view in MVC Core that will display a status message that will be dynamically updated while a process on the server side controller is actively running.

For example, using the YouTube .NET Data API, I want to fetch all of my YouTube videos. As each video data object is retrieved and added to a collection of YouTube videos which I will subsequently add to the database, I want to pass a "status" message containing information about the video being retrieved back to the view so that the user will know what is going on while they wait for the process to complete.

I don't want my users to have to stare at a blank page or a "spinning-doing something" status image while they wait for the YouTube videos to be retrieved and added to the database. I want them to see something useful while they wait.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.400297 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO