Language preference:

Phase 4 / Designing the contents of DataBound controls

Until now, our BLD Explorer application has been using DataBound controls that automatically determine the list of DataFields and apply a standardized layout. In this phase, we will show several ways to take control over what is shown and how it is formatted. It all starts with the BLDDataField and BLDLabel controls...

<des:BLDFormView ID="BLDFormView1" runat="server" 
   DataSourceID="DataSource1" DataKeyNames="ProductID" AllowPaging="True" 
   AutoGenerateButtons="None"  AutoScaffold="No" >
   <ItemTemplate>
      <table class="DetailsViewContainer">
         <tr class="DetailsViewDataFieldRow">
            <td class="DetailsViewLabelContainer">
               <des:BLDLabel ID="BLDLabel1" runat="server" AssociatedControlID="ProductNameLabel" />
            </td>
            <td class="DetailsViewDataContainer">
               <des:BLDDataField ID="ProductNameLabel" runat="server" DataField="ProductName" />
            </td>
         </tr>
      </table>
   </ItemTemplate>
</des:BLDFormView>
Tours for Phase 4
  1. Free form layout using the BLDDataField control - Work like you would in other ASP.NET applications, replacing the data oriented controls with the BLDDataField control.
  2. The BLDLabel control - Displaying text from the Business Logic Layer.
  3. Introduction to Pattern Templates - Often HTML layouts are repeated. Move them into Pattern Template files.
  4. Using Pattern Templates - The DataFieldInPattern object connects a DataField to a Pattern Template.
  5. Using Named Styles - Use Named Styles to change the styles defined on controls and HTML within Pattern Templates.
  6. Play with the BLD Database Explorer Application - Run the application to see how the changes to the content shown by the Databound controls.