Preparing the Input Page

Currently, the Country Profiles page (profiles.asp) contains a listing in static HTML of many of the countries to which Newland offers tours. The countries themselves will be listed on the second page, which you have yet to add. That means that just about all of the content on this page (excluding the banner) is obsolete, so you need to delete it.

Once you have removed all of the old content, you'll need to add a list of links that will let users choose a country profile. Since this list will be dynamically generated, you'll first need to create a recordset that contains the data required to create the links, which includes the countryName and countryID fields. In this task, then, you will clear out the old content and add the recordset needed to create the list of dynamic URLs.

  1. Open profiles.asp in design view.

    I find it much easier to delete page content while in design view, rather than hunting around for it in code view.

  2. Drag to select everything on the page starting from the horizontal rule just above Namibia all the way down to the bottom of the table.

    The yellow icon (representing the image map) at the bottom outside of the table should not be selected.


  3. Press Delete. Click the <table> tag in the tag selector to bring the table down to size.

    When you delete massive amounts of content from a Dreamweaver page that uses tables for layout, you usually find that Dreamweaver doesn't refresh the size of the table. The result is that the table is still several screens tall, except it only has two lines of content in it. By clicking the <table> tag in the tag selector, you force Dreamweaver to redraw the table.


  4. Replace the page heading with Select a Country Profile. Replace the first line of body text with The following list shows all of the countries to which we currently offer tours. To learn more about a country, follow its link.

    Here, you are just changing the title and directions of the page to reflect the new functionality of the page.


  5. In the Bindings panel, click the New Binding (+) button, and choose Recordset (Query) from the list.

    You should be getting familiar with the mechanics of adding new recordsets by now.

  6. Name the recordset rs_countryNames. Choose conn_newland as the Connection. Select the tbl_country table, and select the countryName and countryID fields. Order by countryName, ascending.


    You probably know what to expect at this point. Remember, if you are unsure of the data a given query will return, click the Test button to see a preview. If you click this button now, you'll see 16 countries listed in alphabetical order, ranging from Argentina to the United States.

  7. Save the file.