FP2000: How to Return a List of Records as Hyperlinks Using ASP

ID: Q205980


The information in this article applies to:


SUMMARY

This article describes how to return the results from a query as a hyperlink using FrontPage and Active Server Pages (ASP).


MORE INFORMATION

Getting Ready to Use the ASP Features in FrontPage

Before you can use the ASP features in FrontPage, you must install the following components:

Querying Information from Microsoft Access Database Using ASP

To format results of a query as a hyperlink, follow these steps:
  1. Start Microsoft Access 2000 and follow these steps:
    1. In the Microsoft Access dialog box, click Blank Database and click OK.


    2. In the File name box, type Asplink.mdb and click Create.


    3. Click the Tables tab. Double-click Create Table in Design View.


    4. In the Field Name box, type Hyperlink.


    5. On the View menu, click Datasheet View.


    6. When you are prompted to save, click Yes, name the table Hyperlink, and then click OK.


    7. If you are asked to create a primary key, click Yes.


    8. In the Hyperlink box, type the following record into the database
      
      <a href="hyperlink">TextToDisplay</a> 
      where "hyperlink" is the URL this record will link to and TextToDisplay is the display text for the record. For example, if you want to link to the Microsoft Home Page, you can type the following:
      
      <a href="http://www.microsoft.com">Microsoft</a> 


    9. On the File menu, click Exit.




  2. Start FrontPage and create a new Web.
    1. On the File menu, point to New, and click Web.


    2. Click One Page Web.


    3. In the "Please specify a location of the new web" box, type the following:
      
      http://localhost/ASPLink 


    4. Click OK




  3. Import the database into the current web.


    1. On the File menu, click Import.


    2. Click Add File.


    3. Select the asplink.mdb file from the file list, and click Open


    4. Click OK.


    5. When you are prompted to create a new database connection, type ASPLink for the name, and click Yes.


    6. Click Yes again.


  4. In FrontPage, create the ASP page.
    1. On the View menu, click Page.


    2. On the File menu, point to New, and then click the Page.


    3. Double-click Normal Page.


    4. On the Insert menu, point to Database, and click Results.


    5. In Step One of the Database Results Wizard, click to select "Use an existing database connection," and select ASPLink from the list.


    6. Click Next.


    7. Select the Hyperlink table from the Record Source list, and click Next.


    8. Click Next Twice, then click Finish.


    9. Right Click the <<Hyperlink>> column, and select Database Column Value Properties.


    10. Click to select the "Column value contains HTML" check box, and click OK.


    11. Save the Page.


    12. On the File Menu, click Preview in Browser.


    13. Click Microsoft Internet Explorer 5.0, and click Preview




Additional query words: asp iis fpodbc query table list hyperlink multiple fields field database front page


Keywords          : kbdta fphtml fpodbc fpiis kbDatabase kbInternet kbODBC 
Version           : WINDOWS:
Platform          : WINDOWS 
Issue type        : kbinfo 

Last Reviewed: July 1, 1999