Dynamic Web Tutorials and Notes
Search pages
We will make a page that searches the database by the EmployeeID
- File>New
- Select Dynamic Page

- Click ASP VB
Script
- Click ‘Create’
- Save the page as search.asp
- You also need to make a search results page called search_results.asp
- Open search.asp and insert a form – Insert > form
- In the form properties window click on the Action box folder and browse
to the search_results.asp page
- Name the form ‘search_form’
- Make sure method is set to POST
- Inside the form insert a 2*2 table – Insert > table
- Inside the top left cell type ‘Please enter Employee ID’
- Insert a text box into the top right cell and call it ‘search’
– Insert > Form Objects > Text Field
- In the bottom right cell insert a submit button -Insert > Form Objects
> Button
- Save the page
- Open search_results.asp
- Create a DSN to your database if necessary (see IV)
- Create a Recordset (see V) – rsSearch
- When creating the recordset set the filter to EmployeeID (what we will search by)
- The next box to the right is set to =
- The next box underneath is set to Form Variable
- Type ‘search’ into the last box (this is the name of your
text box in the search page)
- Still in the search_results.asp page build a 2*11 table to contain
the results of your search.
- As in VI drag the bindings into the right hand table column
- Type the titles in the left column
- Save the pages
- Restart the machine and enter a search query to test