The BindManager
The BindManager is a
Manager which uses a specific implementation to do the dirty work. There is a WebBinder and a WindowsBinder, one uses web controls and the other windows controls, but the working is basically the same. Which implementation is used is configured in the application config file and loaded via
dependency injection and of course depends on the platform you're using.
Purpose
The purpose of the BindManager is to facilitate easy binding of DomainObjects to the user interface (like a panel) and persistence of data on screen back into the DomainObejct.
How to use
The BindManager has some static methods which allows you binding and persisting in one line of code.
This the Bind method of
ManageUser.aspx:
It binds the DomainObject
MyUser to the
panel panelMyUser.
You can use an overloaded version of this method to bind a DomainCollection to a grid, like is done in
SelectUser.aspx:
The ManageUser form will look like this: