| Lesson 5 || Displaying data on the Web |
| Objective || Display data using bound controls. |
Display Data using Bound Controls
In the earlier lesson, Binding data-bound Design Time Controls, you learned how to display records by connecting to a database and binding fields directly to HTML text box controls. You had to establish a relationship between the control and the data. A command object takes care
of this detail for you, making the process easier.
To display data using bound controls and the command object, all you have to do is drag the desired fields from the command object to the Web page. Now, it doesn't get much easier than that. The command object (BookRecordsCmd) created in Lesson 3, will be used to display BookTable data by using bound controls. The following simulation illustrates how the command object can be used to easily display information in a Web page.
Using Command Object
Dragging fields from the command object and dropping them into the page is simpler and faster than binding fields to controls. In addition, a little more work is done for you because the HTML table tags and field names are automatically inserted for you.
Up to this point, we have only been able to view a single record. In the next lesson, you will add the RecordsetNavBar DTC to the Web page.