---
title: SAIFWarp
summary: API reference for SAIFWarp.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Controls.Infragistics111
reference_type: package
---

# SAIFWarp

`SAIFWarp` extends the Infragistics `WebAsyncRefreshPanel` to add two SAIF-specific behaviors around asynchronous partial-page refreshes: it carries the ID of the control that should regain input focus after a refresh completes, and it wires a shared client-side error handler that redirects the browser to a central error page when an asynchronous callback fails above a severity threshold. Consuming `.aspx` pages declare it directly in markup as the async-refresh container for a page region; it has no callers or collaborators within this library beyond the ASP.NET WebForms control lifecycle and `Page.ClientScript`.

## Purpose
- Restore client-side input focus to a designated control after an asynchronous panel refresh, via a hidden field and a generated client script ([BR-CTL-009](../../business-rules.md#br-ctl-009-focus-target-carried-to-client-in-a-hidden-field), [BR-CTL-011](../../business-rules.md#br-ctl-011-focus-restoration-failures-do-not-break-the-page)).
- Surface asynchronous callback failures by redirecting the browser to a shared error page when the failure severity exceeds a threshold ([BR-CTL-010](../../business-rules.md#br-ctl-010-async-failures-above-severity-threshold-redirect-to-the-error-page)).
- Ensure none of this client-script wiring runs while the control is rendered in the Visual Studio designer ([BR-CTL-007](../../business-rules.md#br-ctl-007-client-script-wiring-skipped-in-design-mode)).

## Context
- Namespace: `SAIF.Presentation.Web.Controls.V2`
- Assembly/package: `SAIF.Presentation.Web.Controls.Infragistics111` (packaged as source into `SAIF.BOF.Presentation.Web.Infragistics111`)
- Base class: `Infragistics.WebUI.Misc.WebAsyncRefreshPanel` (external Infragistics 11.1 vendor type; not part of this repository's documentation set)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `ControlsFocus` | `Public Property ControlsFocus() As Boolean` (default `True`) | Enables registration of the client-side refresh-complete focus-restoration script and its `ClientSideEvents` wiring; when `False`, no focus handling is installed for this instance. |
| `FocusControlID` | `Public Property FocusControlID() As String` (default `""`) | Client ID of the control that should regain focus after an asynchronous refresh; its value is written into the hidden field `<ID>_FOCUS` that the client script reads. |
| `CreateChildControls` | `Protected Overrides Sub` | Adds the `<ID>_FOCUS` hidden-field control to the panel's control collection, seeded from `FocusControlID` ([BR-CTL-009](../../business-rules.md#br-ctl-009-focus-target-carried-to-client-in-a-hidden-field)). |
| `RenderContents` | `Protected Overrides Sub(writer As HtmlTextWriter)` | Refreshes the hidden field's value from the current `FocusControlID` immediately before delegating to the base renderer, so a focus target assigned after `CreateChildControls` still reaches the client. |

<!-- Private members (SAIFWarp_Init, SAIFWarp_PreRender, GetScriptWithMessage, and the private script/constant fields) are internal implementation details and are not part of the public surface; see Operations and processes for their behavior. -->

## Behavioral notes
- `SAIFWarp_Init` and `SAIFWarp_PreRender` are private event handlers (`Handles Me.Init` / `Handles Me.PreRender`) that perform the actual script registration described in [Restore focus and handle errors after an async refresh](../../operations/restore-focus-and-handle-async-errors.md); they are not directly callable by consumers.
- The error redirect always carries the fixed message `DEFAULT_ERROR` ("An error occurred in an asynchronous callback."); no code path in this type supplies a dynamic exception message.**
- A private constant `LASTERROR_SUFFIX` is declared but never referenced by live code; an intended last-exception mechanism appears incomplete or was relocated elsewhere.**

## Constraints and usage notes
- Behavior depends on the Infragistics 11.1 client-side API and the `WebAsyncRefreshPanel.ClientSideEvents` surface; it is version-locked to `Infragistics35.WebUI.Misc.v11.1`.*
- Consuming applications must host `/weberror/processError.aspx` and `/Resources/Images/saif_progressIndicator.gif` at the site root for the error redirect and progress indicator to resolve correctly.

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

## Sources
- `SAIF.Presentation.Web.Controls.Infragistics111/SAIFWarp.vb`
