Skip to content

Initialize page (session ping + control reset)

Every page that inherits AppViewPageBase runs this operation on the standard ASP.NET Init/Load lifecycle. It enables session keep-alive by default (unless the client is external) and normalizes control back-color styling so form fields render consistently across postbacks.

Field Value
Operation ID OP-CORE-001
Trigger ASP.NET page lifecycle Init and Load events
Inputs EnableSessionPing, CallResetBackcolor, environment client classification
Outputs Registered client script blocks; CSS classes reset on every control in the page tree
Primary components AppViewPageBase.Page_Init, AppViewPageBase.Page_Load, AppViewPageBase.CallSessionPing
Entry point SAIF.Presentation.Web.Core.Infragistics111/AppViewPageBase.aspx.vb

Steps

  1. On Init, set EnableSessionPing = True and call the designer InitializeComponent. (BR-CORE-001)
  2. On Load, call CallSessionPing().
  3. In CallSessionPing, if EnableSessionPing is False, exit immediately without registering any script.
  4. Query AppGlobal.EnvironmentService.IsClientExternal. (BR-CORE-002)
  5. If the client is external: skip script registration entirely and return.
  6. Origin: This step delegates to AppGlobal.EnvironmentService.IsClientExternal, provided by the SAIF framework environment service (package SAIF.BOF.Framework). The callee's internal classification logic is not implemented in this repository and could not be traced.**

  7. Build a script include for /resources/scripts/PingSession.js and a startup script calling InitializeSessionPing().
  8. If the SessionPing script block is already registered on the page: skip registration (no duplicate). (BR-CORE-003)
  9. Otherwise: register both script blocks via ClientScript.
  10. Back in Load, evaluate CallResetBackcolor.
  11. If True: call Utilities.clsControlManager.ResetBackColor(Me). (BR-CORE-004) > Origin: Step 6's back-color normalization is fully implemented in Reset control back colors (SAIF.Presentation.Web.Core.Infragistics111, this library) — see that page for the recursive control-tree logic.
  12. If False: no back-color reset occurs this cycle.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Page Init/Load]) --> S1["Page_Init: EnableSessionPing = True"]
    S1 --> S2[Page_Load: CallSessionPing]
    S2 --> D1{EnableSessionPing?}
    D1 -->|No| EndSkip([No script registered])
    D1 -->|Yes| D2{IsClientExternal?}
    D2 -->|Yes| EndSkip
    D2 -->|No| D3{SessionPing already registered?}
    D3 -->|Yes| EndOk([Ping active])
    D3 -->|No| S3[Register PingSession.js + startup script]
    S3 --> EndOk
    S2 --> D4{CallResetBackcolor?}
    D4 -->|Yes| S4[ResetBackColor recurses page tree]
    D4 -->|No| EndNoReset([Colors unchanged])
    S4 --> EndOk

Failure and edge-case behavior

  • If AppGlobal.EnvironmentService is unavailable, the client-classification query would fail; this library assumes the environment service is always present at runtime.**
  • Repeated Load events (e.g. partial postbacks) never duplicate the ping script because of the registered-block check in step 5.

Sources

  • SAIF.Presentation.Web.Core.Infragistics111/AppViewPageBase.aspx.vb