Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

search, zero results, with suggestions

Status
Not open for further replies.

mayamanako

Technical User
Aug 31, 2005
113
GB
Hello folks,

I want to build a search page with results page. And if the results page didn't find anything, let's say because the visitor didn't typed the word correctly, I want the results page to give some suggested words. How can this be done? My apologies if this question is not appropriate in this part of the forum.

I am using asp.net and SQL server.

Thanks very much indeed.

 
Hope this will help


Dim intCount As Integer
intCount = dsTrnsport.Tables("ItemSearch").Rows.Count
If intCount < 100 Then
gvItemSearch.DataBind()

lblTotal.Text = dsTrnsport.Tables("ItemSearch").Rows.Count.ToString()
If lblTotal.Text = "0" Then
lblSelection.Visible = "true"
lblSelection.Text = "Make sure you make the right selection before you do search"
End If
lblTotal.Text = "Total: " + dsTrnsport.Tables("ItemSearch").Rows.Count.ToString() + " record(s) found"
Else
gvItemSearch.Visible = False
lblSelection.Visible = "true"
lblSelection.ForeColor = Drawing.Color.Red
lblTotal.Text = dsTrnsport.Tables("ItemSearch").Rows.Count.ToString()
lblSelection.Text = "The search criteria are too general and would return over" & lblTotal.Text & "rows. This exceeds the allowed limit of 100 for this search. Make your search criteria more specific and try again. "
End If
 
if you're talking about spelling checking, or synonyms then I would search for a 3rd party tool to do this. I cannot think of any off the top of my head, but they must exist. I know Lucene.Net is an index searcher for .net. Not sure if it has "expanded" search capabilities.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
thank you guys. i will have a look at those.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top