Using Zoom CGI on an ASP.NET websiteZoom allows you to add a search engine to your ASP.NET website with a native ASP.NET Server Control that provides integration possibilities into your ASP.NET application. For most ASP.NET users, you should use the ASP.NET Server Control and not the method described below. The following page describes an alternative method that allows you to use the high performance (C++ compiled) CGI on an ASP.NET website by creating an ASP.NET wrapper. This might be desirable for people who cannot install a Control on the web server, but have CGI executable permissions (and other requirements detailed below). To find out more about the full Zoom package, visit our homepage. System Requirements for using the Zoom CGI with ASP.NETFor indexing your website, you will require a computer with:
For online searching using ASP.NET (other platforms available),
Q. How do I create an ASP.NET (or ASPX) search page?First, you must have downloaded and installed Zoom on your computer, and indexed your website using the CGI platform option. This will create a set of index files and a working CGI search page. Please see our Users Guide for more information on this step. You can then create an ASP.NET search page which executes the CGI search function, and return the results, thereby allowing you to integrate Zoom into your ASP.NET website seamlessly. The following is a C# example (click here if you prefer a VB.NET example) that can be copy and pasted into your ASPX page to do this. Note that you only need to paste this in one ASPX page (eg. "search.aspx"), which will act as the main page where your search results will be shown. For instructions on how to insert a search forms on the other ASPX pages of your website, see this FAQ.
You will also have to make the following changes (this is important):
You should now have a functioning ASP.NET search page. UTF-8 TroubleshootingIf you are using a specific encoding on your website (which you have set in the Zoom Indexer Configuration window, under the "Languages" tab), but your web server is defaulting to a different encoding, then you may be seeing garbled characters on your search page. If this is the case, locate the following lines in the above code:
And replace them with (C# code below):
In VB.NET, you can use the following code:
This assumes you are using UTF-8 as your selected website encoding. For different encodings, replace "UTF-8" with the charset name, eg. "windows-1251", "iso-8859-2", etc. For more information, check the Microsoft documentation for Encoding. VB.NET Example (to run the CGI version of Zoom on an ASPX page)Note that the rest of the instructions in the above section also applies here, when using VB.NET to embed the CGI version into an ASPX page. Note that you only need to paste this in one ASPX page (eg. "search.aspx"), which will act as the main page where your search results will be shown. For instructions on how to insert a search forms on the other ASPX pages of your website, see this FAQ.
If you encounter encoding problems with UTF-8, see the troubleshooting section above. Q. How do I create a search form on my ASPX pages?Please see this other FAQ, "How do I create a search form on ASPX pages?" on the Troubleshooting ASP.NET page for more information. Return to the Zoom Search Engine Support page |