Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

How to preserve previous screen state/results with ASP.NET Core 2 MVC/Razor views

$
0
0

Hi,

I have an application using ASP.NET Core 2 MVC and Razor views, with some minimal jQuery. What I have trouble with is preserving contents from previous screens. I believe in older versions of ASP.NET, the ViewState was used for this? So imagine having some result rendered on a screen, user navigates to next screen, and presses back button. In my current implementation the initial controller is called and screen is rendered from scratch without any content. I would expect that e.g. pressing browser back button the previous screen results would be present (from browser cache?). How could I achieve this? There is some information on state management for Core, but these all require you to manually manage screen-specific state. This really feels like I'm trying to over-engineer something that is obviously simple for someone else :) 


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>