A BLDPageManager control is required on any page that uses Peter’s Business Logic Driven UI.
The BLDPageManager control connects your DataBound controls (GridView, BLDFormView, etc) to the BLD framework.
Its primary tool is the DataBound Control Adapter classes that are added to its Adapters property.
Each DataBound Control must have an associated DataBound Control Adapter.
<des:BLDPageManager ID="BLDPageManager1" runat="server" >
<Adapters>
<des:BLDListViewAdapter DataBoundControlID="BLDListView1" />
</Adapters>
</des:BLDPageManager>
The DataBound Control Adapters are loaded with functionality. Here are some of the tasks handled by DataBound Control Adapters:
<des:BLDPageManager ID="BLDPageManager1" runat="server" >
<Adapters>
<des:BLDFormViewAdapter DataBoundControlID="RecordDetails"
ValidationSummaryControlID="ValidationSummary1"
SupportsEditActions="false" SupportsInsertActions="true"
ActionsUseRouting="true" PostInsertAction="List" PostCancelAction="List" />
</Adapters>
</des:BLDPageManager>
The BLDPageManager control has numerous event handlers. While they may not mean much
now, know that when you want to modify something at runtime, check out the BLDPageManager's events.
- ResolveDataField – You can define DataField names that do not exist in your Entity class.
This event is called to determine how to handle those custom DataFields.
It allows you to create content based on anything available to your Web Form (such as query strings, form fields,
and of course the Entity) that will be shown by a Field Template.
Deep Dive
- FieldTemplateLoad - Edit the initial settings of a Field Template object. Attach event handlers
to its DataControl, such as the TextChanged event of a TextBox.
- FieldTemplatePreRender - Adjust the final look of the controls within the Field Template object.
- CustomizeDataField - Override the values supplied by business logic for each DataField.
Add UI specific validators, change DisplayName and other textual properties, and edit many of
the other DataAnnotations.
- MakeActionUrl – Prepares the URL used to redirect to another page upon completing a List, Detail, Insert, or Edit command.
- UpdateErrorMessage – Gives you a chance to change the error messages returned when your business logic reports validation errors.
- PrepareSummaryText - Modify the text returned by EntityFilters that attempt
to describe themselves in a user friendly way. This text in shown as EntityFilters are applied
by the BLDFilterSummary control and, BLDFilterField control when its DisplayMode = Summary.
- CustomizeButton - Modify the text shown by the BLDFilterSummary control and, BLDFilterField control when its DisplayMode = Summary.
- DataBoundControlAdapterInitialized - Be notified when you can start using the DataBoundControlAdatper object to customize your user interface.
In the next topic, you'll learn
about the BLDCustomizer control.