CodeSnip: Using the Windows Indexing Service with ASP.NET and C#
page 1 of 5
Published: 24 Mar 2008
Abstract
The Windows Indexing Service is a useful tool for providing web based search facilities. In this code sample, Brett shows how to build a .NET friendly search facility using ASP.NET and C#. He begins with a short introduction and then provides a detailed analysis of the code given at the end of the article.
by Brett Burridge
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 35042/ 111

Introduction

The Windows Indexing Service is used to index files via the file system and allow them to be searched through a set of API's. One popular use of Indexing Services is to provide a website search facility for websites hosted on Internet Information Services (IIS).

This article describes how to use Indexing Services from within ASP.NET using C#. The article is "fully .NET friendly," in that it describes how search results can be retrieved as an ADO.NET DataTable and displayed in a DataGrid (using a GridView would use near identical code to that shown). This allows search results to be manipulated and presented in ways that were not easily possible using classic ASP, such as by making use of the built in data column sorting functionality, and the ability to use paging for the search results.

This article assumes that you know how to use Indexing Services and are familiar with the concepts of creating search catalogs. The code sample assumes that an Indexing Service search catalog called "searchcatalog" has already been set up on your web server.

The code samples will work with Index Server on Windows NT 4.0 systems and Indexing Services on Windows Server 2000/2003/XP systems.

Incidentally, if you want to use Index Server with classic ASP, then read this article: http://aspalliance.com/358_Searching_Index_Server_With_ASP.


View Entire Article

User Comments

No comments posted yet.






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2017 ASPAlliance.com  |  Page Processed at 2017-03-25 11:35:06 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search