ViewPageBase.VIEWSTATE_CTRL_ENUM¶
ViewPageBase.VIEWSTATE_CTRL_ENUM is the public nested enum consumed by ViewPageBase.ViewStateInSession to opt a page out of the default page-embedded ViewState and into session-backed storage instead, either for external users only or unconditionally for all users (BR-MVC-030). It exists because the framework's own PageStatePersister override needs an explicit, per-page decision on this trade-off rather than a single global switch.
Purpose¶
- Selects the ViewState persistence strategy for a page instance: standard page-embedded state, session-backed state limited to non-internal callers, or session-backed state for every caller.
- Backs the
EXT_VIEWSTATE_SESSIONconfiguration fallback, which the overriddenPageStatePersisterproperty consults when this enum is left at its default.
Context¶
- Namespace:
SAIF.Presentation.Web.MVC* - Assembly/package:
SAIF.Presentation.Web.MVC
Public members¶
| Member | Signature | Purpose |
|---|---|---|
NONE |
NONE |
Default. ViewState is persisted using the standard ASP.NET page-embedded mechanism |
EXTERNAL_USERS |
EXTERNAL_USERS |
ViewState is moved into session storage only when the current caller's address is not on the internal network (i.e. not matching 10.*) |
ALL_USERS |
ALL_USERS |
ViewState is unconditionally moved into session storage for every caller |
Behavioral notes¶
- Per the type's own developer documentation comment, this setting should only be changed with guidance and support of the architecture team, reflecting its impact on server memory and session size.*
- When
ViewStateInSessionis left atNONE, theEXT_VIEWSTATE_SESSIONAppSettingskey can still force session-backed persistence for external callers, soNONEdoes not guarantee page-embedded ViewState in every deployment.
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Sources¶
- SAIF.Presentation.Web.MVC/ViewPageBase.aspx.vb