equivalent of ASP.NET MVC TempData in ASP.NET

喜你入骨 提交于 2020-01-02 04:32:09

问题


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.



来源:https://stackoverflow.com/questions/6198037/equivalent-of-asp-net-mvc-tempdata-in-asp-net

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!