SQLConfiguration SQLConfiguration

Data Access  «Prev  Next»
Lesson 6 Adding navigation controls
Objective Add navigation controls to move within a recordset.

Add Navigation Controls to move within a Recordset

Up to this point, we have only been able to display a single record in the Specials.asp page. Would not it be nice, and useful, to be able to move back and forth in the recordset to view other records? Sure it would, and the RecordsetNavBar DTC is just the tool we need. Like other DTCs, it is simply dropped into a Web page. It has a recordset property that is set to associate it with the recordset data. The control uses buttons, which can be set with captions or images, and placed horizontally (the default) or vertically. The RecordsetNavBar control will add four buttons to the VirtualBookShelf Web page. The buttons are used to move forward or backward one record at a time, or to jump to the first or last record in the set.
The following simulation shows how to add a RecordsetNavBar control to the Specials.asp.

Adding Recordset NavBar Design Time Control
In the simulation you just completed only one record was displayed at a time in the Web page. To display several records at a time, PHP provides the Grid DTC.
In addition to displaying several records at a time, the GRID DTC lets you set various properties to control the data's appearance.
In the next lesson, you will learn how parameterized queries are used to retrieve specific records based on user input.

Adding Navigation Controls - Exercise