Click here to Skip to main content
11,414,561 members (67,686 online)
Click here to Skip to main content

Creating Search Pages with Index Server and .NET

, 25 Jan 2003 Ms-PL
Rate this:
Please Sign up or sign in to vote.
Combine the ADO.NET techniques you know - and perhaps some you don't know - with the power and flexibility of Microsoft Index Server and ASP.NET to create easy - yet powerful - custom search pages for your Web site.


When Index Server was released, it was easy to see that it had potential. A developer could not only index document content, but could easily index document properties and meta-data. To create search pages and result pages, you could use fairly simple IDQ and HTX files. With the inception of ActiveServer Pages (ASP) in Internet Information Server (IIS) 3.0, Index Server 2.0 added server-side helper objects. Finally, OLE DB drivers were added in Index Server 3.0 which was shipped with Windows 2000 so that developers could query Index Server in the same manner that they would query a database. It is this technology that makes powerful custom search pages in ASP.NET easy.

Using the Index Server OLE DB provider with ADO.NET allows us to data-bind results to common ASP.NET WebControls like the DataGrid, Repeater, and more. The simple paging features of these WebControls is also an advantage over previous models when we had to manage paging the results ourselves with server-side conditional statements and multiple forms on a page to handle either POST or GET requests.

This article will show you the techniques involved to create a query and result page in ASP.NET, to add data-bound WebControls to the page, and to allow for advanced query statements while protecting sensitive content.

Before you continue with this article, you should already be familiar with the basic architecture of Index Server, which can be found in the Platform SDK at MSDN. These features will not be discussed in any detail throughout the article.

Create the Search Page

Before designing your search page, you'll first want to consider what document properties and meta-data the user can search and how those results are to be displayed. Typically, the user is allowed to enter a query to search for all words or any words, or that uses boolean expressions, exact expressions, or even natural language expressions. The user should be allowed to select what type of expression their query is, and "All Words" is usually default. It is also good to provide your user a way to limit their search to a particular scope, such as directories containing individual products or departments. This also gives you the ability to use your search page as a target for a UserControl that could appear at the top of each page and sets the scope to match its parent directory. You should also let the user specify how the results are to be sorted and how many appear on a page.

You'll also need to decide how to display the results to the user. Below is a common format and the format that will be used later in this article:

<a href="[VPath]">[DocTitle]</a>
<i><a href="[VPath]">[SERVER_NAME][VPath]</a> - Last Modified: [Write]</i>

Knowing what your results will look like helps determine what control to use. You could use a DataList or Repeater, but then you would have to manage paging yourself. Instead, you might choose to use a DataGrid with a TemplateColumn. Using this approach, you can acheive the same result with the additional paging functionality for virtually free.

Index Server and ADO.NET

When Microsoft added an OLE DB provider to Index Server 3.0 in Windows 2000, they provided developers the means to query Index Server using the same ADO techniques they use to query databases like SQL Server, Oracle, Access, and many more. These techniques are similar in ADO.NET, except ADO.NET presents developers with more features and capabilities like DataSets, or disconnected recordsets. While features of DataSets like primary keys, relationships, and identity columns aren't used in this article, they are worth mentioning.

Supporting ADO and ADO.NET also means that we can query Index Server using SQL statements like any other database. If you take a look at the Indexing Service Reference on MSDN, you'll see that Index Server supports views, batched statements, and all the basic SQL commands you probably know. An example of a SQL statement to select the fields from the above layout would look like:

SELECT Rank, VPath, DocTitle, Filename, Characterization, Write
WHERE NOT CONTAINS(VPath, '"_vti_" OR ".config"')
    AND CONTAINS(Contents, '"keyword1" AND "keyword2"')
    AND CONTAINS(DocTitle, '"keyword1" AND "keyword2"')

The SCOPE and CONTAINS keywords may be new to you. The SCOPE function allows us limit our query to a particular directory or directories, and whether or not we want subdirectories included. Where's the database reference? That's implied from the SQL connection string:

Provider=MSIDXS.1;Data Source=Web

The CONTAINS and FREETEXT predicates are available in both Index Server 3.0 and SQL Server 2000 (since both use the same Full-text providers) and allow a user to query a particular column (or even a table) for a keyword or combination of keywords using a boolean expression. Use the CONTAINS predicate to search for the existence of such keywords or the FREETEXT predicate for natural language searches.

The SQL statement above is the basis for the other queries used in the example code, but you can easily extend this sample to search for documents modified or created after certain dates, articles by certain authors (without a lot of work, this currently only applies to Office documents), and much more. You can even search for properties of media files or create your own filters (see the IFilter documentation). Index Server will also index your custom META elements. For information about using custom filters, see Using Custom Filters with Indexing Service on MSDN.

Warning: When designing opened-ended SQL statements, especially those used on the Internet by anonymous users, always be sure to not allow malicious statements to destroy your databases and catalogs. One of the biggest mistakes of webmasters and designers are statement templates like:

SELECT * FROM Table1 WHERE Field1 =

A condition would then be appended to the statement. So what's wrong with this approach? All it takes is someone to enter a "term" like the following and your day is ruined:

"asdf"; DELETE FROM Table1;

Think this is unlikely? Think again. Most modern databases support meta-data queries, giving users the ability to find out just about anything about the database and its structure. A user with malicious intent could use a couple queries and potentially delete all data from all your tables or event drop them. So, always design your SQL statement templates with care. Since Index Server supports batched queries separated by semi-colons (";"), I stripped-out any semi-colons so the statement "DELETE FROM Table1" would become no more than three keywords by which to search. This is a very basic way and there are better ways like having more advanced parsing functions, but this is only example and this is left as an exercise for you - although this approach should stop about everything.

You should also pay attention to the first condition in the WHERE clause. Adding this condition causes the query to not return search results for files or directories that contain the terms listed. Use the suggested terms above and add your own to keep a user from seeing sensitive files or directories like your application's "Web.config" file or FrontPage directories like "_vti_cnf". While anonymous users may not be able to view these files or browse these directories directly, they can view sensitive information from the characterizations (summaries) in their search results.

Binding Search Results to a DataGrid

Data-bound controls in ASP.NET are very powerful and can be used in many applications. For this exmaple, we'll bind a DataSet from the query discussed above to a DataGrid and use its powerful paging functionality to let users navigate through pages of the search results. From this point on, almost all the functionality of the example is given to us at minimal development costs.

Remember the search result template at the beginning of the article? This is obviously not a columnar template, so how do we acheive that in a DataGrid? A TemplateColumn allows us to find fields and expressions using HTML as we normally would. To tell the binding container to use a particular expression for binding, we use the <%# %> data binding expression syntax. Such an expression would look like the following:

<asp:hyperlink runat="server"
    NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "VPath")%>'
    ><%# GetTitle(Container.DataItem)%></asp:hyperlink>

This would display a hyperlink with the document path as the target and the appropriate document title or filename. GetTitle() is a protected method in our code-behind class that determines if DocTitle is available and - if not - returns the Filename instead. As you can see, a binding expression isn't limited to a data-binding expression. See the sample source code for a complete example of the result display format given at the beginning of this article. Feel free to try different layouts or add additional columns, from BoundColumns for a single column to TemplateColumns for custom layouts like the example above. Make sure to set AutoGenerateColumns to false, however, otherwise all selected fields will be output in additional and prior to your user-defined bound columns.

Paging the Results

As mentioned before, using the DataGrid data-bound control to display our search results gives us a paging technique for virtually free. Previous solutions in ASP or even with IDQ/HTX files either forced us to use large GET queries - which can be affected by length restrictions imposed by browsers' address bars - or have multiple forms contained in our page. ASP.NET only allows a page to have one server-side form, although these previous techniques could be accomplished with client-side forms and page-output statements. This can be tedious and ASP.NET presents us with better, object-oriented options.

To handle the paging of data, set AllowPaging to true and add a new event handler for DataGrid.PageIndexChanged event and enter the code below, replacing dgResultsGrid with whatever control name you use:

private void dgResultsGrid_PageIndexChanged(object source, <BR>  DataGridPageChangedEventArgs e)
    this.dgResultsGrid.CurrentPageIndex = e.NewPageIndex;
    this.Search(); // A private method that actually starts the search.

This will set the start position of the bound source to the DataGrid.CurrentPageIndex multiplied by the DataGrid.PageSize.

You can change the style of the paging used from a page-numbering system like the example uses, form or text buttons, or even custom navigation controls. See the DataGrid Web Server Control documentation on MSDN for more information.


Using the ADO.NET techniques you already know and use to retrieve results from a database, you can build fast, powerful search pages without a lot of work like that which was required before. The OLE DB provider for Index Server offers you great flexibility and additional functions and predicates that add more great features to your query. Using easy-to-use data-bound controls with which you're already familiar like the DataGrid allow you to display those results quickly and without a lot of code. Combining all three technologies with the simple techniques discussed above and in the sample source code can give your site powerful search capabilities in a short amount of time.


This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


About the Author

Heath Stewart
Program Manager Microsoft
United States United States
Heath Stewart is a happily married software engineer originally from the Midwest and a graduate of Iowa State University. Heath start programming early in life and enjoys continuous research and development in new languages, frameworks, and platforms. Fluent in many different programming languages, he has developed many large-scale software solutions for companies in different areas, such as Internet filtering, intrusion detection systems, production management systems, and web applications for various purposes. He also enjoys photography.

Currently, Heath is a Program Manager in the Visual Studio Professional Deployment Experience (VSPro DEX) team at Microsoft. Previous to his employment, he was a Microsoft MVP for Visual C#.

He is also a CodeProject protector and is happy to help the development community.
Follow on   Twitter

Comments and Discussions

GeneralMy vote of 5 Pin
manoj kumar choubey28-Feb-12 19:28
membermanoj kumar choubey28-Feb-12 19:28 
GeneralNo Records Return in search Pin
Lymni3-Sep-10 5:10
memberLymni3-Sep-10 5:10 
QuestionEliminate certain directory in query Pin
Freeweight3-Jun-10 4:38
memberFreeweight3-Jun-10 4:38 
AnswerRe: Eliminate certain directory in query Pin
Heath Stewart19-Jul-10 3:20
protectorHeath Stewart19-Jul-10 3:20 
Generalindexing server Pin
venky4562-Oct-07 22:42
membervenky4562-Oct-07 22:42 
GeneralSpecifying Content to be indexed Pin
ashepherd16-Oct-06 9:04
memberashepherd16-Oct-06 9:04 
GeneralAbstracts Pin
ajwelch2-Oct-06 2:51
memberajwelch2-Oct-06 2:51 
GeneralRe: Abstracts Pin
Heath Stewart2-Oct-06 17:18
protectorHeath Stewart2-Oct-06 17:18 
GeneralRe: Abstracts Pin
ajwelch2-Oct-06 23:27
memberajwelch2-Oct-06 23:27 
GeneralRe: Abstracts Pin
Heath Stewart3-Oct-06 12:26
protectorHeath Stewart3-Oct-06 12:26 
Generalnavigable links not showing up on search results Pin
ajwelch26-Sep-06 1:00
memberajwelch26-Sep-06 1:00 
GeneralRe: navigable links not showing up on search results Pin
Heath Stewart26-Sep-06 8:45
protectorHeath Stewart26-Sep-06 8:45 
GeneralRe: navigable links not showing up on search results Pin
ajwelch29-Sep-06 4:46
memberajwelch29-Sep-06 4:46 
GeneralRe: navigable links not showing up on search results Pin
ajwelch2-Oct-06 2:48
memberajwelch2-Oct-06 2:48 
GeneralPost to search from textbox on another page Pin
ajwelch12-Sep-06 0:46
memberajwelch12-Sep-06 0:46 
GeneralRe: Post to search from textbox on another page Pin
Heath Stewart12-Sep-06 7:14
protectorHeath Stewart12-Sep-06 7:14 
GeneralRe: Post to search from textbox on another page Pin
ajwelch18-Sep-06 2:44
memberajwelch18-Sep-06 2:44 
This is what i am doing at the moment.
On my master page. I have a text box and button with the code:

<asp:TextBox ID="txtSearch" Columns="12" style="height: 17px; border: 1px solid #1c3f94;" runat="server"></asp:TextBox>
                                    <asp:Button ID="btnSearch" runat="server" Text="Go!" style="height: 20px; font-size: 8pt;
                                          background-color: #1c3f94; border: none; color: white;" OnClick="btnSearch_Click" />
In the code behind of the master page I have:

Partial Class MasterPage
      Inherits System.Web.UI.MasterPage

      Sub btnSearch_Click(ByVal s As Object, ByVal e As EventArgs)
            Server.Transfer("SiteSearch.aspx", True)
      End Sub

End Class

This sitesearch.aspx page is as follows:

<%@ Page language="c#" Inherits="Search._Default" CodeFile="SiteSearch.aspx.cs" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<meta content="Microsoft Visual Studio 7.0" name=GENERATOR>
<meta content=C# name=CODE_LANGUAGE>
<meta content=JavaScript name=vs_defaultClientScript>
<meta content= name=vs_targetSchema>
         <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
<div style="width:100%;height:90px;">
            <img src="Images/commssolutionbanner.gif" style="float: right" />
      <a href="index.aspx"><img src="Images/topleftabteclogo.gif" style="border-right: medium none; border-top: medium none; border-left: medium none; border-bottom: medium none" /></a><a href="index.aspx">HOME</a></div>
<form id=Default method=post runat="server">
<p><asp:label id=lblQuery runat="server" Width="100px">Query:</asp:label><asp:textbox id=txtQuery accessKey=Q runat="server" Width="300px"></asp:textbox><asp:RequiredFieldValidator id=reqValQuery runat="server" ErrorMessage="RequiredFieldValidator" Display="Dynamic" ControlToValidate="txtQuery">You must specify a query.</asp:RequiredFieldValidator><br><asp:label id=lblQueryType runat="server" Width="100px">Query Type:</asp:label><asp:dropdownlist id=cboQueryType accessKey=T runat="server" Width="300px">
<asp:ListItem Value="All" Selected="True">All Words</asp:ListItem>
<asp:ListItem Value="Any">Any Words</asp:ListItem>
<asp:ListItem Value="Boolean">Boolean Expression</asp:ListItem>
<asp:ListItem Value="Exact">Exact Expression</asp:ListItem>
<asp:ListItem Value="Natural">Natural Language</asp:ListItem>
</asp:dropdownlist><br><asp:label id=lblDirectory runat="server" Width="100px">Directory:</asp:label><asp:dropdownlist id=cboDirectory accessKey=D runat="server" Width="300px">
<asp:ListItem Value="/" Selected="True">Entire Site</asp:ListItem>
<asp:ListItem Value="/Products">Products</asp:ListItem>
<asp:ListItem Value="/Products/App1">Products: App1</asp:ListItem>
<asp:ListItem Value="/Products/App2">Products: App2</asp:ListItem>
<asp:ListItem Value="/Services">Services</asp:ListItem>
<asp:ListItem Value="/Help">Help</asp:ListItem>
</asp:dropdownlist><br><asp:label id=lblSortOrder runat="server" Width="100px">Sort Order:</asp:label><asp:dropdownlist id=cboSortBy accessKey=S runat="server" Width="135px">
<asp:ListItem Value="Rank" Selected="True">Search Rank</asp:ListItem>
<asp:ListItem Value="DocTitle">Document Title</asp:ListItem>
<asp:ListItem Value="Write">Last Modified</asp:ListItem>
</asp:dropdownlist><asp:dropdownlist id=cboSortOrder runat="server" Width="100px">
<asp:ListItem Value="ASC" Selected="True">Ascending</asp:ListItem>
<asp:ListItem Value="DESC">Descending</asp:ListItem>
</asp:dropdownlist><asp:button id=btnSearch runat="server" Text="Search" onclick="btnSearch_Click"></asp:button>
      Please click search to submit</p>
<p><asp:label id=lblResultCount runat="server" Font-Italic="True" visible="False">X documents were found:</asp:label></p>
<p><asp:datagrid id=dgResultsGrid runat="server" PageSize="25" AllowPaging="True" AutoGenerateColumns="False" Visible="False" Font-Size="8pt" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Vertical">
<itemstyle horizontalalign="Left" verticalalign="Top" BackColor="#EEEEEE" ForeColor="Black">

<headerstyle font-bold="True" BackColor="#000084" ForeColor="White">

<asp:TemplateColumn HeaderText="Rank">
<headerstyle width="60px">

<asp:Label id=Label1 runat="server" Text='<%# ((int)DataBinder.Eval(Container, "DataSetIndex")) + 1 %>'></asp:Label>
<asp:TemplateColumn HeaderText="Document Information">
<itemstyle horizontalalign="Left" verticalalign="Top">

<p><asp:hyperlink runat="server" NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "VPath")%>'><%# GetTitle(Container.DataItem)%></asp:hyperlink><br>
<asp:label runat="server"><%# GetCharacterization(Container.DataItem)%></asp:label><br>
<i><asp:hyperlink runat="server" NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "VPath")%>'>http://<%# Request.ServerVariables["SERVER_NAME"]%><%# DataBinder.Eval(Container.DataItem, "VPath")%></asp:hyperlink>
- Last Modified: <asp:label runat="server"><%# DataBinder.Eval(Container.DataItem, "Write")%></asp:label></i></p>

<pagerstyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" Mode="NumericPages">
      <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
      <SelectedItemStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
      <AlternatingItemStyle BackColor="#DCDCDC" />
And the sitesearch.aspx.cs codebehind is:

using System;
using System.Collections;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace Search
     /// <summary>
     /// Summary description for _Default.
     /// </summary>
     public partial class _Default : System.Web.UI.Page
          protected System.Data.OleDb.OleDbCommand oleDbSelectCommand1;
          protected System.Data.OleDb.OleDbDataAdapter dbAdapter;
          protected System.Data.OleDb.OleDbConnection dbConnection;
          protected void Page_Load(object sender, System.EventArgs e)
                  string strSearch = Request.Form["txtSearch"];

                  if (IsPostBack == false)
                        if (!(strSearch.Equals(string.Empty)))
                              this.txtQuery.Text = strSearch;

          #region Web Form Designer generated code
          override protected void OnInit(EventArgs e)
               // CODEGEN: This call is required by the ASP.NET Web Form Designer.
          /// <summary>
          /// Required method for Designer support - do not modify
          /// the contents of this method with the code editor.
          /// </summary>
          private void InitializeComponent()
               this.dbAdapter = new System.Data.OleDb.OleDbDataAdapter();
               this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
               this.dbConnection = new System.Data.OleDb.OleDbConnection();
               this.dgResultsGrid.PageIndexChanged += new System.Web.UI.WebControls.DataGridPageChangedEventHandler(this.dgResultsGrid_PageIndexChanged);
               // dbAdapter
               this.dbAdapter.SelectCommand = this.oleDbSelectCommand1;
               // oleDbSelectCommand1
               this.oleDbSelectCommand1.Connection = this.dbConnection;
               // dbConnection
               this.dbConnection.ConnectionString = "Provider=MSIDXS.1;Integrated Security .=\"\";Data Source=abtecwebsitesearch";


          protected void btnSearch_Click(object sender, System.EventArgs e)

          private void dgResultsGrid_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
               // Update the current page index.
               this.dgResultsGrid.CurrentPageIndex = e.NewPageIndex;

          /// <summary>
          /// Gets the command string for the search.
          /// <seealso cref="Search"/>
          /// </summary>
          private string Command
                    // Construct the base query.
                    string query = String.Format(@"
SELECT Rank, VPath, DocTitle, Filename, Characterization, Write
FROM SCOPE('DEEP TRAVERSAL OF ""/abtecwebsite/""')
WHERE NOT CONTAINS(VPath, '""_vti_"" OR "".config""')",

                    // Conditionally construct the rest of the WHERE clause.
                    string type = this.cboQueryType.SelectedItem.Value.ToLower();
                    string fmt = @" AND (CONTAINS('{0}') OR CONTAINS(DocTitle, '{0}'))";

                    // Get the query string and remove all semi-colons, which should stop
                    // attempt to run malicious SQL code.
                    string text = this.txtQuery.Text.Replace(";", "");
                    if (type == "all" || type == "any" || type == "boolean")
                         string[] words = text.Split(' ');
                         int len = words.Length;
                         for (int i=0; i<len; i++)
                              string word = words[i];
                              if (type == "boolean")
                                   if (String.Compare(word, "and", true) == 0 ||
                                        String.Compare(word, "or", true) == 0 ||
                                        String.Compare(word, "not", true) == 0 ||
                                        String.Compare(word, "near", true) == 0)

                              words[i] = String.Format(@"""{0}""", word);
                              if (i < len - 1)
                                   if (type == "all") words[i] += " AND";
                                   else if (type == "any") words[i] += " OR";

                         query += String.Format(fmt, String.Join(" ", words));
                    else if (type == "exact")
                         query += String.Format(fmt, text);
                    else if (type == "natural")
                         query += String.Format(" AND FREETEXT('{0}')", text);

                    // Sort the results.
                    query += String.Format(" ORDER BY {0} {1}",
                         this.cboSortBy.SelectedItem.Value, this.cboSortOrder.SelectedItem.Value);

                    Trace.Write("Query", query);
                    return query;

          /// <summary>
          /// Perform the search.
          /// </summary>
          private void Search()
               // Create a new DataSet and fill it.
                    this.dbAdapter.SelectCommand.CommandText = Command;
                    DataSet ds = new DataSet("Results");

                    this.lblResultCount.ForeColor = Color.Black;
                    int rows = ds.Tables[0].Rows.Count;
                    this.lblResultCount.Text = String.Format("{0} document{1} found{2}",
                         rows, rows == 1 ?   " was" : "s were", rows == 0 ? "." : ":");

                    // Bind the resulting DataSet.
                    this.dgResultsGrid.DataSource = ds;

                    // If all was bound well, display the DataGrid.
                    this.dgResultsGrid.Visible = (rows > 0);
               catch (Exception ex)
                    this.lblResultCount.ForeColor = Color.Red;
                    this.lblResultCount.Text = String.Format("Unable to retreive a list " +
                         "of documents for the specified query: {0}", ex.Message);

                    this.dgResultsGrid.Visible = false;
                    this.lblResultCount.Visible = true;

          /// <summary>
          /// Get the appropriate title from the <see cref="DataGridItem.DataItem"/>
          /// bound to the <see cref="DataGrid"/>.
          /// </summary>
          /// <param name="value">A <see cref="DataGridItem.DataItem"/> for the current record.</param>
          /// <returns>Either the "DocTitle" or "Filename" respectively.</returns>
          protected object GetTitle(object value)
               string title = DataBinder.Eval(value, "DocTitle") as string;
               if (title != null   && title.Length > 0) return title;

               return DataBinder.Eval(value, "Filename");

          /// <summary>
          /// Encodes the characterization since some malformed text could cause
          /// the web browser to not render the remaining elements.
          /// </summary>
          /// <param name="value">A <see cref="DataGridItem.DataItem"/> for the current record.</param>
          /// <returns>The encoded characterization.</returns>
          protected string GetCharacterization(object value)
               return Server.HtmlEncode(DataBinder.Eval(value, "Characterization") as string);

I am getting an error of:

Server Error in '/' Application.

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 29:                  if (IsPostBack == false)
Line 30:                  {
Line 31:                        if (!(strSearch.Equals(string.Empty)))
Line 32:                        {
Line 33:                              this.txtQuery.Text = strSearch;

Source File: c:\Inetpub\Test Abtec Website\SiteSearch.aspx.cs      Line: 31

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   Search._Default.Page_Load(Object sender, EventArgs e) in c:\Inetpub\Test Abtec Website\SiteSearch.aspx.cs:31
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

GeneralRe: Post to search from textbox on another page Pin
Heath Stewart18-Sep-06 7:22
protectorHeath Stewart18-Sep-06 7:22 
GeneralRe: Post to search from textbox on another page Pin
ajwelch18-Sep-06 7:28
memberajwelch18-Sep-06 7:28 
GeneralRe: Post to search from textbox on another page Pin
Heath Stewart18-Sep-06 7:31
protectorHeath Stewart18-Sep-06 7:31 
GeneralRe: Post to search from textbox on another page Pin
ajwelch20-Sep-06 0:17
memberajwelch20-Sep-06 0:17 
GeneralRe: Post to search from textbox on another page Pin
Heath Stewart20-Sep-06 8:36
protectorHeath Stewart20-Sep-06 8:36 
GeneralRe: Post to search from textbox on another page [modified] Pin
ajwelch20-Sep-06 23:43
memberajwelch20-Sep-06 23:43 
GeneralAll working but get error when clicking on search links. Pin
ajwelch8-Sep-06 1:31
memberajwelch8-Sep-06 1:31 
GeneralRe: All working but get error when clicking on search links. Pin
Heath Stewart8-Sep-06 7:02
protectorHeath Stewart8-Sep-06 7:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150427.4 | Last Updated 26 Jan 2003
Article Copyright 2003 by Heath Stewart
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid