---
title: Page initialization and session keep-alive
summary: Initializes page state on ASP.NET lifecycle events and registers a session keep-alive script for internal clients.
status: draft
owner: SAIF Documentation Team
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Core.Infragistics103
reference_type: package
operation_id: OP-AVPB-001
trigger: ASP.NET page lifecycle events (Init, Load) on any page inheriting AppViewPageBase
---

# Page initialization and session keep-alive

This operation runs on every page inheriting `AppViewPageBase`, performing baseline page initialization, control CSS reset, and — for internal clients — registering a client-side session keep-alive script.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-AVPB-001 |
| **Trigger** | ASP.NET page lifecycle events (`Init`, `Load`) on any page inheriting `AppViewPageBase` |
| **Inputs** | None beyond page state |
| **Outputs** | Registered client script blocks, control CSS resets |
| **Primary components** | `AppViewPageBase.Page_Init`, `Page_Load`, `CallSessionPing` |
| **Entry point** | `SAIF.Presentation.Web.Core.Infragistics103\AppViewPageBase.aspx.vb` |

## Steps

1. `Page_Init` sets `EnableSessionPing = True` (default-on) and calls the designer-stub `InitializeComponent` (empty body).
2. `Page_Load` calls `CallSessionPing()`.
3. If `CallResetBackcolor` is `True` (default), calls `Utilities.clsControlManager.ResetBackColor(Me)` to recursively normalize control CSS classes across the page.
4. `CallSessionPing`: if `EnableSessionPing` is `True` **and** `AppGlobal.EnvironmentService.IsClientExternal` is `False` — enforces [BR-AVPB-001](../business-rules.md#br-avpb-001-session-keep-alive-only-applies-to-internal-non-external-clients) — registers a script include for `/resources/scripts/PingSession.js` and a startup script calling `InitializeSessionPing()`.
   - If already registered: guarded by `ClientScript.IsClientScriptBlockRegistered` to avoid double registration.
   - Depends on a `SessionPing.aspx` page existing in the consuming application (documented constraint, not enforced in code).

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([Page_Init]) --> S1[EnableSessionPing = True]
	S1 --> S2[Page_Load fires]
	S2 --> S3[CallSessionPing]
	S3 --> D1{EnableSessionPing and not IsClientExternal?}
	D1 -->|Yes| S4[Register PingSession.js and startup script]
	D1 -->|No| Skip[Skip ping registration]
	S2 --> D2{CallResetBackcolor True?}
	D2 -->|Yes| S5[ResetBackColor recursively]
	D2 -->|No| EndNoReset([End])
```

## Failure and edge-case behavior
- External client sessions are allowed to time out normally; internal sessions receive the keep-alive script only if a `SessionPing.aspx` page exists in the consuming application (not enforced in code).

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [API reference](../api/index.md)

## Sources
- SAIF.Presentation.Web.Core.Infragistics103\AppViewPageBase.aspx.vb
- SAIF.Presentation.Web.Core.Infragistics103\clsControlManager.vb
