---
title: Bind page controls to the model
summary: Pushes the hosting page's Model object into every auto-binding control on the page.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Controls.AJAX.Infragistics111
reference_type: package
operation_id: OP-AJAX-01
trigger: Page code-behind calls BindingManager.DataBind()
---

# Bind page controls to the model

This operation resolves the hosting page's `Model` object once and pushes it into every control on the page that participates in automatic binding, so that each control can subsequently bind its own value.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-AJAX-01 |
| **Trigger** | Page code-behind calls `BindingManager.DataBind()` |
| **Inputs** | The page's `Model` property, `Page.Controls` tree |
| **Outputs** | Every auto-binding control on the page has `RootBindingObject` set |
| **Primary components** | `BindingManager.DataBind` |
| **Entry point** | `SAIF.Presentation.Web.Controls.AJAX.Infragistics111/BindingManager.vb` |

## Steps

1. Resolve the root object once via `BindingUtility.GetObjectValue(Page, "Model")` and cache it. ([BR-AJAX-001](../business-rules.md#br-ajax-001-bindable-root-object-is-the-pages-model-property))
   - The hosting page must expose a property literally named `Model`; `BindingManager.RootObjectName` is publicly settable but the private `GetRootObject` hard-codes `"Model"`, so the setting is not honored.*
2. Walk `Page.Controls` recursively; for any control that has children, recurse, otherwise call `BindControl`. ([BR-AJAX-002](../business-rules.md#br-ajax-002-controls-join-automatic-binding-via-iautobindingcontrol-or-their-container))
3. `BindControl` assigns `RootBindingObject = RootObject` when the control is an `iAutoBindingControl`, or when its `BindingContainer` is one. ([BR-AJAX-002](../business-rules.md#br-ajax-002-controls-join-automatic-binding-via-iautobindingcontrol-or-their-container))
   - If the control is neither, it is silently skipped.
   - Only leaf controls are inspected, so an `iAutoBindingControl` that itself has children is bound through its child's `BindingContainer` rather than directly.*

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([BindingManager.DataBind called]) --> Resolve[Resolve Model via reflection]
	Resolve --> Walk[Walk Page.Controls recursively]
	Walk --> Leaf{Leaf control?}
	Leaf -->|No| Walk
	Leaf -->|Yes| Check{Is iAutoBindingControl<br>or BindingContainer is one?}
	Check -->|Yes| Assign[Assign RootBindingObject]
	Check -->|No| Skip([Skip control])
	Assign --> Done([All controls bound])
```

## Failure and edge-case behavior
- A control that is neither an `iAutoBindingControl` nor hosted by one is silently skipped — no error is raised.*
- An `iAutoBindingControl` with its own children is bound through its child's `BindingContainer` rather than directly, because only leaf controls are inspected.*

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

> **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.AJAX.Infragistics111/BindingManager.vb`
- `SAIF.Presentation.Web.Controls.AJAX.Infragistics111/BindingUtility.vb`
