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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.
回答2:
You can use either Session or Viewstate to pass data between pages in ASP.NET application.