是的ViewState相关的ASP.NET MVC?是的、ViewState、ASP、NET

2023-09-03 05:36:33 作者:猛虎总是独行

我学习ASP.NET MVC和ASP.NET的许多概念,如身份验证,授权,会话状态仍适用于它。

I am learning ASP.NET MVC and many concepts of "ASP.NET" like authentication, authorization, session state still apply to it.

不过,无论从任何一点我明白,我没有看到ViewState的仍然是有关在ASP.NET应用程序。但它的存在(System.Web.Mvc.ViewPage的属性)!难道只存在兼容性的原因,或者还是有某种目的/使用?

But from whatever little I have understood, I don't see that ViewState is still relevant in an ASP.NET application. But it is there (property of System.Web.Mvc.ViewPage)! Is it there only for compatibility reasons or it still have some purpose/use?

推荐答案

是的,这是正确的。视图状态是不相关的。更多关于页面模型和MVC这里的differencies:

Yes, that is correct. ViewState is not relevant. More on differencies between Page Model and MVC here:

的ASP.NET Web窗体的兼容性和ASP.NET MVC