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

# FocusManager

`FocusManager` is a non-visual helper control that emits an inline client-side `<script>` block to move keyboard focus to a designated control when the page loads, saving host pages from hand-writing focus-management JavaScript.

## Purpose
- Set browser focus to a specific control by ID after the page renders, wrapped in a `try`/`catch` so a missing element does not raise a client-side script error.

## Context
- Namespace: `SAIF.Presentation.Web.Controls.V2`
- Assembly/package: Compiled into `SAIF.BOF.Presentation.Web.Infragistics103`*

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `BoundControlId` | `Public Property BoundControlId As String` | Identifies (by control ID, resolved via `Page.FindControl`) which control on the page should receive focus when the page loads. |

## Inherited public members

`FocusManager` inherits from `Control` (`System.Web.UI`), a framework base class rather than a documented SAIF dependency library.

| Member | Signature | Purpose |
| --- | --- | --- |
| `ID` | `Public Property ID As String` | Server-side identifier used by naming containers and by other controls looking up this helper control. |
| `ClientID` | `Public ReadOnly Property ClientID As String` | Rendered client-side ID emitted into markup when the control participates in output. |
| `Controls` | `Public ReadOnly Property Controls As ControlCollection` | Child controls collection available if the helper is extended with nested controls. |
| `EnableViewState` | `Public Property EnableViewState As Boolean` | Controls whether the helper persists state across postbacks. |
| `NamingContainer` | `Public ReadOnly Property NamingContainer As Control` | Parent naming container used to scope ID resolution. |
| `Page` | `Public ReadOnly Property Page As Page` | Owning page used here to resolve `BoundControlId` and register the startup script. |
| `Parent` | `Public ReadOnly Property Parent As Control` | Immediate containing control in the server control tree. |
| `Visible` | `Public Property Visible As Boolean` | Determines whether the control participates in rendering. |

Standard `Control` members (`ID`, `ClientID`, `Controls`, `Visible`, `DataBind`, `FindControl`, etc.) are not re-documented here as they are unmodified framework behavior**.

## Behavioral notes
- `Render` only emits the focus script if `BoundControlId` is set and `Page.FindControl(BoundControlId)` resolves to an existing control; otherwise it renders nothing.
- The script is registered via `Page.ClientScript.RegisterStartupScript`, so it executes once per page render.

## Constraints and usage notes
- `BoundControlId` must resolve relative to the host page's naming container; a mismatched or misspelled ID silently results in no focus action, with no error surfaced to the developer.


> **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.V2\FocusManager.vb
