.NET Daily

Recommended Resources

Popular Content

Tagkeep variables between page requests

Web Development

ASP.NET Core. Best way to Keep Variables between Page Requests

Posted on August 19th, 2017.

In case you want to keep variables between page requests, ASP.NET CORE MVC and ASP.NET MVC provides a more elegant solution than the classic ViewState. It is called TempData. The usage of it is pretty straightforward. The example from below shows how I assign a variable to preserve the sort state of a column in a list table:...