How do I store data between requests in ASP.NET MVC?

前端 未结 2 1761
我在风中等你
我在风中等你 2021-01-11 09:42

My application reads barcodes from a USB scanner. I treat them as tokens and then build commands from those tokens. There may be a situation that I need 2 or more reads befo

2条回答
  •  清酒与你
    2021-01-11 10:27

    The TempData dictionary is ideal for storing data between controller actions. It's most commonly used in the Post/Redirect/Get pattern but could apply here.

    This is a good article to read about it: http://www.devcurry.com/2012/05/what-is-aspnet-mvc-tempdata.html

提交回复
热议问题