Saving content of a view so that it can be re-loaded later when view is accessed again RRS feed

  • Question

  • User-734459410 posted

    So I'm working on an ASP.NET MVC intranet web app for my company.  I have a View that basically is a large table of data (list of sales orders that is read from a database).  When the person navigates away from this view, the data is lost, and thus has to be reloaded when they use a link to go back to the View (which is the default homepage for the project).

    II have a "Reload" button on the page that can force the underlying C# code to re-load/refresh the data from the database and display it.  The reason I want to store this is because sometimes the data doesn't change, and each time the View is loaded, it can take up to 30 seconds to load.

    Is this something maybe I could store using the ViewBag, and then maybe check the viewbag to see if the data already exists and load it if there is a table already stored in the viewbag?

    Thoughts on how to accomplish this?  The application also does not use AJAX although I am planning to implement it to improve load time and overall functionality.

    Wednesday, September 25, 2019 9:05 PM