---
title: SAIFWarp
summary: API reference for SAIFWarp.
status: draft
owner: SAIF Documentation Team
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Controls.Infragistics103
reference_type: package
---

# SAIFWarp

`SAIFWarp` wraps the Infragistics `WebAsyncRefreshPanel` to centralize three cross-cutting concerns for AJAX-refreshed panels in SAIF WebForms pages: redirecting the whole page to a shared error screen when an async-refresh operation fails with `flags > 1` ([BR-4](../../business-rules.md#br-4-async-refresh-error-redirects-to-central-error-page)), initializing the Infragistics progress-indicator image, and restoring keyboard focus to a designated child control after each async postback completes. Consuming pages declare it directly as a server control (`<{0}:SAIFWARP runat=server>`) and set `FocusControlID` to the control that should regain focus.

## Purpose
- Provide a single, centralized error-redirect path (`/weberror/processError.aspx`) for any async-refresh failure inside the panel, so consuming pages do not each implement their own error handling ([BR-4](../../business-rules.md#br-4-async-refresh-error-redirects-to-central-error-page)).
- Restore focus to a named child control after an async postback, using a hidden field to carry the target control's ID across the refresh.
- Initialize the Infragistics AJAX progress-indicator image consistently across all consuming pages.

## Context
- Namespace: `SAIF.Presentation.Web.Controls.V2`
- Assembly/package: `SAIF.BOF.Presentation.Web.Infragistics103` (source bundled into this package; compiled output supplied by the sibling `SAIF.Presentation.Web.Core.Infragistics103` project)*

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `ControlsFocus` | `Public Property ControlsFocus As Boolean` (default `True`) | Enables or disables registration of the focus-restoration script after an async refresh. |
| `FocusControlID` | `Public Property FocusControlID As String` | Client ID of the control that should regain focus after an async refresh completes. |
| `CreateChildControls` | `Protected Overrides Sub CreateChildControls()` | Adds the hidden input `{ID}_FOCUS` used to carry the focus target across the async postback. |
| `RenderContents` | `Protected Overrides Sub RenderContents(writer)` | Refreshes the hidden focus field's value from the current `FocusControlID` immediately before rendering. |

## Private members

Members in this section are declared `Private` in `SAIFWarp.vb` and are not part of the public API surface; they are documented here only to describe internal behavior relevant to consumers.

| Member | Signature | Purpose |
| --- | --- | --- |
| `SAIFWarp_Init` | `Private Sub SAIFWarp_Init(sender, e) Handles Me.Init` | Registers the focus-restoration script (when `ControlsFocus` is enabled) and wires the panel's `InitializePanel` client-side event; see [SAIFWarp async-refresh initialization](../../operations/saifwarp-async-refresh-initialization.md). |
| `SAIFWarp_PreRender` | `Private Sub SAIFWarp_PreRender(sender, e) Handles Me.PreRender` | Wires the async-refresh error handler and registers the progress-indicator init script; see [SAIFWarp pre-render error/init script registration](../../operations/saifwarp-pre-render-error-init-script-registration.md). |
| `GetScriptWithMessage` | `Private Function GetScriptWithMessage(inMessage As String) As String` | Substitutes the error message into the error-script template used by the redirect behavior ([BR-4](../../business-rules.md#br-4-async-refresh-error-redirects-to-central-error-page)). |

## Inherited public members

Members in this section are inherited from `Infragistics.WebUI.Misc.WebAsyncRefreshPanel`, the Infragistics v10.3 vendor base class this control wraps.

| Member | Signature | Purpose |
| --- | --- | --- |
| `ClientSideEvents` | `Public ReadOnly Property ClientSideEvents As ClientSideEvents` (Infragistics `ClientSideEvents` object) | Exposes the panel's client-side event hook names (`RefreshComplete`, `Error`, `InitializePanel`, etc.); `SAIFWarp` sets these properties to wire its generated script function names during `Init`/`PreRender`. |
| `RefreshComplete` | `Public Property RefreshComplete As String` (of `ClientSideEvents`) | Name of the client-side function invoked when an async refresh of the panel completes; set to `"SAIFWARP_RefreshComplete"` by `SAIFWarp_Init` when `ControlsFocus` is `True`. |
| `Error` | `Public Property Error As String` (of `ClientSideEvents`) | Name of the client-side function invoked when an async refresh operation errors; set to `ERROR_SCRIPT_BLOCK_NAME` (`"SAIFWarp_Error"`) by `SAIFWarp_PreRender`. |
| `InitializePanel` | `Public Property InitializePanel As String` (of `ClientSideEvents`) | Name of the client-side function invoked when the panel initializes on the client; set to `INIT_SCRIPT_NAME` (`"WARP_Init"`) by `SAIFWarp_Init` when `ControlsFocus` is `True`. |
| `getProgressIndicator` (client-side) | JavaScript method on the panel's client object, invoked from `WARP_Init` | Returns the panel's AJAX progress-indicator client object, whose `setImageUrl` is called by `SAIFWarp`'s init script to point at `/Resources/Images/saif_progressIndicator.gif`. |
| `ID` | `Public Overridable Property ID As String` (from `System.Web.UI.Control`) | The control's server-side identifier; used by `SAIFWarp` to construct the hidden field's ID (`{ID}_FOCUS`) and read via `oPanel.getID()` in the generated `FOCUS_SCRIPT`. |
| `Controls` | `Public ReadOnly Property Controls As ControlCollection` (from `System.Web.UI.Control`) | The child-control collection; `SAIFWarp.CreateChildControls` adds the hidden focus field to it via `Controls.Add`. |
| `DesignMode` | `Protected ReadOnly Property DesignMode As Boolean` (from `System.Web.UI.Control`) | Indicates whether the control is being used at design time; checked by `SAIFWarp_Init` and `SAIFWarp_PreRender` to skip all script registration at design time. |
| `Page` | `Public Property Page As Page` (from `System.Web.UI.Control`) | The hosting page instance; `SAIFWarp` uses `Page.ClientScript` to register all of its client scripts. |

## Behavioral notes
- All script registrations guard against duplicate injection via `Is*ScriptRegistered` checks before calling `RegisterClientScriptBlock`/`RegisterStartupScript`.
- At design time (`DesignMode = True`), script registration is skipped entirely.
- The `ToolboxData` markup for this control is `<{0}:SAIFWARP runat=server></{0}:SAIFWARP>`, with `DefaultProperty("Text")`.

## Constraints and usage notes
- Requires ASP.NET WebForms hosting an Infragistics `WebAsyncRefreshPanel`; not usable outside a WebForms page lifecycle.
- Version-coupled to Infragistics v10.3 (`Infragistics35.WebUI.Misc.v10.3`, version `10.3.20103.2120`).

> **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.Infragistics103\SAIFWarp.vb
