In ASP.NET MVC, there's a TempData which can pass data one time from one page to another. What's the equivalent for this in ASP.NET?
There is no direct equivalent (that is, data that is only passed to the next page).
You can use Session
and clear it out on the receiving page.
You can use either Session or Viewstate to pass data between pages in ASP.NET application.
来源:https://stackoverflow.com/questions/6198037/equivalent-of-asp-net-mvc-tempdata-in-asp-net