Before you can use the ASP features in FrontPage, you must
install the components listed in the following Microsoft Knowledge Base
article:
312638 FP: What You Need to Use Active Server Pages (ASP) in FrontPage 2000
Getting started
Create a new Web using the appropriate steps for your version of
FrontPage:
- In FrontPage 2000:
- On the File menu, point to New, and then click Web.
- In the New dialog box, click Empty Web.
- In the Specify the location of the new
Web box, type http://localhost/aspMultiSample.
Or, type the address of the server that has the FrontPage Server Extensions
installed and supports Active Server Pages (ASP).
- Click OK.
- In FrontPage 2002:
- On the File menu, point to New, and then click Page or Web.
- In the New Page or Web task pane, click Web Site Templates.
- In the Web Site Templates dialog box, click Empty Web.
- In the Specify the location of the new
Web box, type http://localhost/aspMultiSample.
Or, type the address of the server that has the FrontPage Server Extensions
installed and supports ASP.
- Click OK.
Creating the Database Results Page
- Insert a new page by clicking the New Page button on the Standard toolbar.
- On the Insert menu, point to Database, and then click Results.
- In the first step of the Database Results Wizard, click
Use a sample database connection (Northwind) and click Next.
- In the Record Source list, click Employees. Click Next.
- Click Edit List.
- In the Displayed Fields dialog box, remove all fields except City and Country. Click OK.
- Click More Options.
- In the More Options dialog box, click Criteria.
- In the Criteria dialog box, click Add. In the Field Name list, click City. In the Comparison list, click Equals. In the Value box, type City. In the And/Or list, click And. Click OK.
- Click Add. In the Field Name list, click Country. In the Comparison list, click Equals. In the Value box, type Country. In the And/Or list, click And. Click OK.
- In the Criteria dialog box, click OK.
- In the More Options dialog box, click OK.
- Click Next.
- In the Choose formatting options for the records
returned by the query list, click Table - one record per
row. Click to select all of the check boxes and then click Next.
- In step five of the wizard, click Split records
into groups, click to select the Add search form check box, and then click Finish.
- Save the page by clicking Save on the File menu. Name the file Dataresults.asp.
Adding Drop-Down Menus
- Add a drop-down menu for the City:
- In the search form, click the City text box and press
DELETE.
- With your cursor in the table cell next to City, point
to Database on the Insert menu and then click Results.
- In the Use an existing database
connection list, click Sample, and then click Next.
- In the Record Source list, click Employees, and then click Next.
- Click Edit List.
- In the list of fields, remove all of the fields except City and click OK.
- Click Next.
- In the Choose formatting options for the
records return by the query list, click Drop-Down List - one record per item.
City should appear in both the Display values
from this field and the Submit values from this field
boxes. - Click Next.
- Click Display all records together and
click Finish.
- Add the drop-down menu for the Country:
- In the search form, click the Country text box and
press DELETE.
- With your cursor in the table cell next to Country,
point to Database on the Insert menu and then click Results.
- In the Use an existing database
connection list, click Sample, and then click Next.
- In the Record Source list, click Employees, and then click Next.
- Click Edit List.
- In the list of fields, remove all of the fields except
Country and click OK.
- Click Next.
- In the Choose formatting options for the
records returned by the query list, click Drop-Down List - one record per item.
Country should appear in both the Display
values from this field and the Submit values from this
field boxes. - Click Next.
- Click Display all records together and
click Finish.
- Save your page.
Eliminate Duplicate Entries
- Viewing the duplicates:
- On the File menu, click Preview in Browser.
- If you are prompted to select a browser, select your
browser and then click Preview.
- When your browser opens, click the City or Country
drop-down list.
Notice that duplicate entries appear in the City and
Country drop-down lists. - Close the browser and switch back to
FrontPage.
- Filter out duplicates for the City:
- Double-click the Database Results region for the City
drop-down list.
The Database Results Wizard starts. - In the Use existing database
connection list, click Sample, and then click Next.
- Click Next.
- In the Record Source list, click Employees.
- Select the Custom Query option.
- Click Edit.
- In the SQL statement, delete the asterisk (*) and then
type DISTINCT CITY. Click OK.
- Click Next until you reach the end of the wizard and then click Finish.
- Filter out duplicates for the Country:
- Double-click the Database Results region for the
Country drop-down list to start the Database Results Wizard.
- In the Use existing database
connection list, click Sample, and click Next.
- Click Next.
- In the Record Source list, click Employees.
- Select the Custom Query option.
- Click Edit.
- In the SQL statement, delete the asterisk (*) and then
type DISTINCT COUNTRY. Click OK.
- Click Next until you reach the end of the wizard and then click Finish.
- Save your page and preview it in your browser.
Notice that the duplicate entries no longer appear in the City and Country drop
down lists.