McAfee Secure sites help keep you safe from identity theft, credit card fraud, spyware, spam, viruses and online scams
Browse Categories
 Affiliates
 Backup & Restore
 Billing & MyAccount FAQs
 Control Panels
 Customer Tools
 Databases
 Dedicated Servers
 DNS and Domain Registration
 Email
 General Information
 Glossary
 Network
 News
 PCI Compliance
 Pre-sales FAQ
 Publishing Your Site
 Reseller Tips
 Search Engine Optimization
 Security Topics
 SSL and HTTPS
 Virtual Desktops
 Virtual Servers
 Website Design & Development
 Website Errors

Quick Links
Submit Technical Support Ticket
Submit Sales & Billing Ticket
Manage My Hosting Account
Pay My Hosting Bill
Manage Domain Registration

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:
  1. Search.html is a simple web form asking for the search criteria.  Upon submission, the search request is sent to search.asp.
  2. 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

© 2001 - 2010 3Essentials Inc.
Terms Of Service | Privacy Policy | Copyright Policy | Affiliates