Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 2nd, 2007, 02:50 AM
Registered User
Join Date: Nov 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to maulik77 Send a message via Yahoo to maulik77
Default File Search / Indexing Search with .net 2.0

Hello friends Follwing are the code for Indexing search.
you need not to create new catlog for Indexing searching.

(Simple Text box, gridview and Button)

<html >
<head runat="server">
    <title>Untitled Page</title>
    <form id="form1" runat="server">
        <br />
        <br />
        <asp:Label ID="Label1" runat="server" Text="Search String"></asp:Label>
        &nbsp; &nbsp;<asp:TextBox ID="TextBox1" runat="server" Width="493px"></asp:TextBox>
        <asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None"
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <EditRowStyle BackColor="#999999" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <br />
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Search" /></div>

Code Behind

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Cisso;
using System.Data.OleDb;

public partial class _Default : System.Web.UI.Page
    protected void Button1_Click(object sender, EventArgs e)
        GridView1.DataSource = GetIndexResults(TextBox1.Text);
    private DataTable GetIndexResults(string Query)
        Cisso.CissoQueryClass csQueary = new Cisso.CissoQueryClass();
        Cisso.CissoUtilClass csUtil = new Cisso.CissoUtilClass();
        csQueary.Query = TextBox1.Text;
        csQueary.SortBy = "rank[d]";
        csQueary.Columns = "DocTitle, vpath, path, filename, size, write, characterization";
        csUtil.AddScopeToQuery(csQueary,"/Myfiles", "deep" );

        DataSet ds = new DataSet();
        OleDbDataAdapter da = new OleDbDataAdapter();
        da.Fill(ds, csQueary.CreateRecordset("nonsequential"), "IndexServerResults");
        if( ds.Tables[0].Rows.Count > 0 && ds.Tables[0].Rows[0]["characterization"].ToString() !="")
         Response.Write( Server.HtmlEncode(ds.Tables[0].Rows[0]["characterization"].ToString()));
        return ds.Tables[0];

Just Copy paste the code test it then format it properly.

Happy Coding.

Maulik Pandya
Old February 2nd, 2007, 04:17 AM
Friend of Wrox
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post

Hey Friend

Thanx for the info, but frankly couldn't get what you're trying to show us, also how can we use your inbuilt "Cisso" class????


Fortune favours the brave, so don't regret on missed oppurtunities.
Old March 15th, 2007, 12:45 AM
Registered User
Join Date: Nov 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to maulik77 Send a message via Yahoo to maulik77

Please find following link for deatil articles.

[Source: http://msdn2.microsoft.com/en-us/library/ms689718.aspx ]
[Source: http://msdn2.microsoft.com/en-us/library/ms689720.aspx ]
[Source: http://www.asp101.com/articles/john/...er/default.asp ]

Happy Coding..

Maulik Pandya

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search button doesn't search Access DB cbones Visual Studio 2008 1 October 27th, 2008 07:36 PM
File Search ybg1 Access 2 October 10th, 2007 02:09 AM
New text search doesn't preselect search string planoie Visual Studio 2005 0 July 23rd, 2007 06:47 AM
Search Engine for Full-text Search Kala ASP.NET 1.0 and 1.1 Professional 2 August 29th, 2004 02:16 AM
Search engine that search through local drive! wenzation Classic ASP Basics 0 August 26th, 2003 09:15 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.