![Page 1: Paging Through a Data Table Creating a Navigation Bar Using the Recordset Navigation Bar Server Behavior](https://reader036.vdocument.in/reader036/viewer/2022082711/56649f2a5503460f94c44ec5/html5/thumbnails/1.jpg)
Paging Through a Data Table
Creating a Navigation Bar Using the
Recordset Navigation BarServer Behavior
![Page 2: Paging Through a Data Table Creating a Navigation Bar Using the Recordset Navigation Bar Server Behavior](https://reader036.vdocument.in/reader036/viewer/2022082711/56649f2a5503460f94c44ec5/html5/thumbnails/2.jpg)
Paging Through a Data Table
When a data table contains too many records to display onscreen at once, you need a way to page through the data.To help you do this, Dreamweaver has an Application object called the Recordset Navigation Bar server behavior.The following tutorial steps you through the process of creating a Recordset Navigation Bar that the user can use to page through a data table onscreen.
![Page 3: Paging Through a Data Table Creating a Navigation Bar Using the Recordset Navigation Bar Server Behavior](https://reader036.vdocument.in/reader036/viewer/2022082711/56649f2a5503460f94c44ec5/html5/thumbnails/3.jpg)
Create an ASP Page
Pull down the File menu and choose New to bring up the New Document dialog.Select the Dynamic Page category to make the Dynamic Page options appear.Select ASP JavaScript and click the Create button; the new page appears.Pull down the File menu, choose Save, and save the file in your site’s local root folder; in this example, make the name of the page be DataTablePaging.asp.
![Page 4: Paging Through a Data Table Creating a Navigation Bar Using the Recordset Navigation Bar Server Behavior](https://reader036.vdocument.in/reader036/viewer/2022082711/56649f2a5503460f94c44ec5/html5/thumbnails/4.jpg)
Defining the Data Source
If you have not already defined the data source containing your table, follow these steps:
Click to position your cursor in the Databases window. If the Databases window is not visible, pull down the Window menu and choose Databases.Click the plus-sign button and choose Custom Connection String.When the Custom Connection String dialog appears, enter the name of the connection and your connection string.
![Page 5: Paging Through a Data Table Creating a Navigation Bar Using the Recordset Navigation Bar Server Behavior](https://reader036.vdocument.in/reader036/viewer/2022082711/56649f2a5503460f94c44ec5/html5/thumbnails/5.jpg)
Entering the Connection String
In this course, the connection string is:
"DBQ=C:\webs.oet.udel.edu\fthstudents\databases\lastname\TopSecret.mdb;DRIVER={Microsoft Access Driver (*.mdb)}“
-or-
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\webs.oet.udel.edu\fthstudents\databases\lastname\TopSecret.mdb“
If you are running your own Web server, you can use the my.udl wizard to create the connection string.
![Page 6: Paging Through a Data Table Creating a Navigation Bar Using the Recordset Navigation Bar Server Behavior](https://reader036.vdocument.in/reader036/viewer/2022082711/56649f2a5503460f94c44ec5/html5/thumbnails/6.jpg)
Create a Recordset Data Binding
Click the Bindings tab of the Application window, or pull down the Window menu and choose Bindings.Click the plus sign button and choose recordset to make the recordset dialog appear.Customize the Name field to suit your application. If this is a list of users, for example, make the Name field say UsersRecordset.Choose the connection that contains the table.Select the data table containing your data.Select the data fields you want displayed.Click OK.
![Page 7: Paging Through a Data Table Creating a Navigation Bar Using the Recordset Navigation Bar Server Behavior](https://reader036.vdocument.in/reader036/viewer/2022082711/56649f2a5503460f94c44ec5/html5/thumbnails/7.jpg)
Select the Application Toolbar
If the Insert toolbar is not already set to Application, pull down the Insert bar and choose Application to make the Application toolbar appear:
![Page 8: Paging Through a Data Table Creating a Navigation Bar Using the Recordset Navigation Bar Server Behavior](https://reader036.vdocument.in/reader036/viewer/2022082711/56649f2a5503460f94c44ec5/html5/thumbnails/8.jpg)
Display the Data Table
Click to position the cursor at the spot on the page where you want to display the data table.From the Application category of the Insert bar, choose Dynamic DataDynamic Table:
![Page 9: Paging Through a Data Table Creating a Navigation Bar Using the Recordset Navigation Bar Server Behavior](https://reader036.vdocument.in/reader036/viewer/2022082711/56649f2a5503460f94c44ec5/html5/thumbnails/9.jpg)
Define the Dynamic Table
When the Dynamic Table dialog appears, choose the recordset you want to display, set the number of records to show at a time, and click OK:
![Page 10: Paging Through a Data Table Creating a Navigation Bar Using the Recordset Navigation Bar Server Behavior](https://reader036.vdocument.in/reader036/viewer/2022082711/56649f2a5503460f94c44ec5/html5/thumbnails/10.jpg)
Test the Page
Press F12 to test the page and make sure it works so far. F12 publishes and tests the page all in one step.When the page appears in your browser, you should see the table onscreen.If you do not see the table, troubleshoot the problem until you get this test to succeed.
![Page 11: Paging Through a Data Table Creating a Navigation Bar Using the Recordset Navigation Bar Server Behavior](https://reader036.vdocument.in/reader036/viewer/2022082711/56649f2a5503460f94c44ec5/html5/thumbnails/11.jpg)
Insert the Recordset Navigation Bar
Click to position the cursor at the spot on the page where you want to display the navigation bar.Pull down the Recordset Paging menu and choose Recordset Navigation Bar:
![Page 12: Paging Through a Data Table Creating a Navigation Bar Using the Recordset Navigation Bar Server Behavior](https://reader036.vdocument.in/reader036/viewer/2022082711/56649f2a5503460f94c44ec5/html5/thumbnails/12.jpg)
Set the Recordset Navigation Bar Options
When the Recordset Navigation Bar dialog appears, choose the recordset you want to display, and set the option to display the navigation options as text or images, as you wish, and click OK:
![Page 13: Paging Through a Data Table Creating a Navigation Bar Using the Recordset Navigation Bar Server Behavior](https://reader036.vdocument.in/reader036/viewer/2022082711/56649f2a5503460f94c44ec5/html5/thumbnails/13.jpg)
Test the Page
Press F12 to test the page. You should now have buttons you can use to page back and forth through the data table:
![Page 14: Paging Through a Data Table Creating a Navigation Bar Using the Recordset Navigation Bar Server Behavior](https://reader036.vdocument.in/reader036/viewer/2022082711/56649f2a5503460f94c44ec5/html5/thumbnails/14.jpg)
Adjust the Page Layout
Stylize the page elements as you wish.Use a surrounding table, for example, to make the navigation bar and the table appear centered with respect to each other as follows: