BindingManager¶
BindingManager is the page-level orchestrator for this library's binding family. Placed once on a hosting ASPX page, it recursively walks the entire Page.Controls tree to assign the page model to every iAutoBindingControl instance and aggregates their individual IsValid/ErrorMessages state into a single page-wide view, implementing Page-wide auto-bind and validate.
Purpose¶
- Locates every control implementing
iAutoBindingControl(directly or via itsBindingContainer) anywhere in the page's control tree and assigns the resolved model object as itsRootBindingObject. - Aggregates page-wide validity (
IsValid) and de-duplicated error text (ErrorMessages) across every auto-binding control on the page, so a single page-level check can drive save/submit logic.
Context¶
- Namespace:
SAIF.Presentation.Web.Controls.V2.AJAX - Assembly/package:
SAIF.Presentation.Web.Controls.AJAX.Infragistics103
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| DEFAULT_ROOT_OBJECT_NAME | Public Const DEFAULT_ROOT_OBJECT_NAME As String = "Model" |
The default page-property name used to look up the model object |
| RootObjectName | Property RootObjectName() As String |
The page-property name used to resolve the model object, defaulting to "Model" |
| RootObject | Property RootObject() As Object |
Lazily resolves and caches the page's model object via RootObjectName |
| IsValid | ReadOnly Property IsValid() As Boolean |
Page-wide validity gate — False if any auto-binding control on the page reports itself invalid, letting hosting pages block save/submit on any single control's failure |
| ErrorMessages | ReadOnly Property ErrorMessages() As String |
Consolidated, de-duplicated error text from every auto-binding control on the page, formatted for direct display in a single page-level error region |
| DataBind | Overrides Sub DataBind() |
Recursively walks Page.Controls, assigning RootObject as the RootBindingObject of every discovered auto-binding control |
Inherited public members¶
Members in this section are inherited from System.Web.UI.WebControls.CompositeControl in the .NET Framework Base Class Library. They are available on this type through inheritance.
| Member | Signature | Purpose | Origin |
|---|---|---|---|
| ID | Property ID As String |
The programmatic identifier assigned to this control instance | System.Web.dll — System.Web.UI.Control |
| Visible | Property Visible As Boolean |
Controls whether this control renders on the page | System.Web.dll — System.Web.UI.Control |
| Controls | ReadOnly Property Controls As ControlCollection |
The collection of child controls; used by DataBind()'s recursive control-tree walk |
System.Web.dll — System.Web.UI.Control |
| CreateChildControls | Overridable Sub CreateChildControls() |
Builds this composite control's child control tree | System.Web.dll — System.Web.UI.WebControls.CompositeControl |
| RenderContents | Overridable Sub RenderContents(writer As HtmlTextWriter) |
Renders this composite control's markup, including the design-mode placeholder label | System.Web.dll — System.Web.UI.WebControls.CompositeControl |
Behavioral notes¶
- Controls are matched either directly (
TypeOf c Is AJAX.iAutoBindingControl) or via theirBindingContainer— this allows binding to work correctly inside naming/templated containers. - In design mode,
RenderContentsrenders a placeholder label showing"[<ID>]"instead of any functional UI, since this control has no visual runtime component.
Constraints and usage notes¶
- Intended to be placed once per page; its
DataBind()must be called explicitly by the hosting page (typically inPage_Load/Page_PreRender) for auto-binding controls to receive their model.
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.Infragistics103\BindingManager.vb