Building an AjaxPro.NET Based Search Engine into Your Website (Page 1 of 4 )
Nowadays, more and more websites provide user friendly features. One such technology is the site-specific search engine. It can improve your visitor's experience of your site by making it easier for them to find exactly the information they're looking for. Done properly, a search engine can cut visitor frustration and encourage return visits. If you'd like to add this functionality to your web site, keep reading; this article is the first of two parts that will show you how.
A
downloadable .rar file is available for this article.
Introduction
Generally, a search follows this rule: users enter some key words in the web page, and then click the "Search" button, and after a very short while the results will be returned. With the rise of Web 2.0 techniques, many local search engines have started to leverage AJAX. With the proper utilization of AJAX, information on web sites becomes more and more available and their capacities have also been greatly improved. In this article, I will show you how to embed a local search engine into an ASP.NET 2.0 website using two famous open source Ajax frameworks: AjaxPro.NET and AJAXSLT.
Author's Note: To follow along with the sample in this article, you're assumed to have installed Visual Studio 2005, AjaxPro.NET framework, and Google’s AJAXSLT framework. In addition, it is suggested that you download the source files accompanying this article.
PrerequisitesBefore delving into the main topic, let’s first examine several prerequisites that are necessary to constructing the local search engine.
Introduction to AjaxPro.NETAjaxPro.NET is a well-known open source framework. It is based on server-side techniques and provides support for constructing different versions of .NET web applications (whose download address is http://www.schwarz-interactive.de). The framework supports the server-side .NET SDK in several ways along with client-side JavaScript. It can direct JavaScript requests to the related server-side .NET methods, after which the server returns the newly-generated special JavaScript code to the browser. The framework's main functions and features are listed below:
- Access the Session and Application data from the client-side JavaScript.
- Cache the required results.
- Freely use source code.
- Add and modify new methods and properties in the framework without modifying any source code.
- All the classes support the client-side JavaScript to return data, and DataSet can be used from inside JavaScript.
- Use the HTML controls to access and return data.
- Do not need to reload the pages and use the event delegates to access data.
- Supply only one method for the complex invocation and therefore dramatically decrease the CPU usage.
Now, to use AjaxPro.NET in our ASP.NET 2.0 web sample application we should properly configure the web.config file. Since the downloaded materials have been shipped with a guide and an excellent Visual Studio Add-in (AjaxProVSTemplate.vsi), we are not going to talk much about the details of this framework. So, let's continue to focus on the next topic.
Next: Introduction to XML/XSLT Techniques >>
More .NET Articles
More By Xianzhong Zhu