ViewControlBase.PageModeEnum¶
ViewControlBase.PageModeEnum is the public nested enum that ViewControlBase.PageMode stores in the control's ViewState. It mirrors ViewPageBase.PageModeEnum's intent but is a distinct, separately-declared type with a different member set — it has no Insert value and its member ordinals differ, so the two enums are not interchangeable despite sharing member names.
Purpose¶
- Represents the interaction mode a user control is currently rendering (view, update, delete, print, PDF, or unknown), persisted across postbacks in the control's own
ViewStateviaViewControlBase.PageMode. - Lets a control branch its rendering and validation logic independently of any page-level
PageModeEnumvalue.
Context¶
- Namespace:
SAIF.Presentation.Web.MVC* - Assembly/package:
SAIF.Presentation.Web.MVC
Public members¶
| Member | Signature | Purpose |
|---|---|---|
View |
View = 0 |
The control is displaying data read-only |
Update |
Update = 1 |
The control is editing an existing record |
Delete |
Delete = 2 |
The control is confirming or performing a delete |
Print |
Print = 3 |
The control is rendering a print-oriented layout |
PDF |
PDF = 4 |
The control is rendering output destined for PDF generation |
Unknown |
Unknown = 99 |
No mode has been explicitly set; the default returned by ViewControlBase.PageMode before first assignment |
Behavioral notes¶
- Unlike
ViewPageBase.PageModeEnum, this enum has noInsertmember, and its ordinal values are shifted down by one relative toViewPageBase.PageModeEnumfromDeleteonward — casting a raw integer between the two enums would silently change meaning.
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/ViewControlBase.ascx.vb