ViewStateMode vs EnableViewState

前端 未结 5 369
盖世英雄少女心
盖世英雄少女心 2020-12-29 18:34

What\'s the difference between:

  • ViewStateMode: Disabled / Enabled / Inherit
  • EnableViewState: True / False

It\'s in the properties of as

5条回答
  •  有刺的猬
    2020-12-29 19:07

    Till ASP.NET 3.5 Version, Page Level view state control Property (EnableViewState) treat as highest priorities, means whether control level Property is True or False it doesn't change the behavior it sees page level Property. But in ASP.NET 4 Version, New Property ViewStateMode is used which has value

    1.Disabled - will disable the viewstate for that page or control(i.e if page level property is disable and control level property is enable now view state will work for control which was previously now working using EnableViewState).

    2.Enable - will enable the viewstate for that page or control(i.e if page level property is enable and control level property is disable now view state will work for not work for control).

    3.Inherit - will inherit the Property of page control Property.

提交回复
热议问题