Skip to content

ViewPageBase.PageModeEnum

ViewPageBase.PageModeEnum is the public nested enum that ViewPageBase.PageMode stores in ViewState, letting a derived screen record and branch on which of seven interaction modes the current page instance is rendering — including a dedicated PDF mode not present on the corresponding ViewControlBase.PageModeEnum, reflecting that full pages (unlike user controls) can render as a printable/PDF output stream.

Purpose

  • Represents the interaction mode a page is currently rendering (view, update, insert, delete, print, PDF, or unknown), persisted across postbacks in ViewState via ViewPageBase.PageMode.
  • Lets derived screens branch their rendering and validation logic on a single, framework-defined mode value instead of ad hoc flags.

Context

  • Namespace: SAIF.Presentation.Web.MVC*
  • Assembly/package: SAIF.Presentation.Web.MVC

Public members

Member Signature Purpose
View View = 0 The page is displaying data read-only
Update Update = 1 The page is editing an existing record
Insert Insert = 2 The page is creating a new record
Delete Delete = 3 The page is confirming or performing a delete
Print Print = 4 The page is rendering a print-oriented layout
PDF PDF = 5 The page is rendering output destined for PDF generation
Unknown Unknown = 99 No mode has been explicitly set; the default returned by ViewPageBase.PageMode before first assignment

Behavioral notes

  • ViewPageBase.PageMode's getter initializes ViewState.Item("pagemode") to Unknown on first access if it was never set, so a page that never calls the setter always reports Unknown rather than View.

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