是否引入了新的 ViewStateMode 属性以避免破坏现有的 EnableViewState?
在页面级别设置 EnableViewState = false 是否会导致 ViewStateMode 设置被忽略?
PS:stackoverflow中的CW是什么?
是否引入了新的 ViewStateMode 属性以避免破坏现有的 EnableViewState?
在页面级别设置 EnableViewState = false 是否会导致 ViewStateMode 设置被忽略?
PS:stackoverflow中的CW是什么?
It is backward compaitable as the default value is Inherit.
If the parent control has set EnableViewState to false then ViewStateMode allows child control to enable it giving much more fine grained control over your viewstate.
see http://weblogs.asp.net/sreejukg/archive/2010/04/06/viewstatemode-in-asp-net-4-0.aspx
"The default value of the ViewStateMode property for a page is Enabled. The default value of the ViewStateMode property for a Web server control in a page is Inherit. As a result, if you do not set this property at either the page or the control level, the value of the EnableViewState property determines view-state behavior."
See http://msdn.microsoft.com/en-us/library/system.web.ui.control.viewstatemode.aspx