Adding a Search page to your site with ASP |
Article ID: 165 |
Back to Search
|
The associated download includes two files you can place on your site to add a search functionality to your site:
- Search.html is a simple web form asking for the search criteria. Upon submission, the search request is sent to search.asp.
- Search.asp contains code which performs the following:
- Iterate through each file of a particular directory (we'll use the root web directory for this example, although you can change it quite easily)
- Open each file and read its contents into a string variable
- Search that string variable for any occurrences of the text string entered by the user in the form in
Search.asp
- If there is a match, display a link to that particular file
You can modify these in your html editor of choice in order to change the formatting, look, and feel to match your overall site.
|
|
Downloads Associated With This Article |
search.zip : Search page in ASP
|