You can write your own TempData provider and store it in cookies. See ASP.NET MVC Store TempData in Cookie . Or you may have a base class controller that searches for hidden input and moistens objects / state and saves it / from it every http request.
Note that TempData is only saved between two controller actions.
Edit:
You can use the same example and write a provider that serializes to DB ... or ... even to disk. Shoot, for that matter, you can even collapse the entire custom replacement for the session. You must create a factory session class and store your custom session objects using the key in some static collection. You will then track this session key either through cookies or through hidden input, as described above.
source share