Click here to Skip to main content
15,919,778 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi I urgently need some help in implementing the search feature for a web application.The information is stored in database and if the search criteria matches the records row in the database I should be able be display those rows in a gridview.Any sample code or help

Updated 27-Aug-12 12:05pm
Christian Amado 27-Aug-12 19:12pm    
Full Text Search in SQL Server brings very cool features for doing this =)
[no name] 27-Aug-12 20:37pm    
Okay what is it specifically that you need help with so urgently?

1 solution


Actually searching functionality is not limited to search for your data from all column. if you have small database then it's fine. but when you have trillions of data and you would like to search for particular string it may take more time.

One of the example is : if i have search string "c# linq", and your have some records in your database. you display the result records in grid. Now next day again i need to search for the same string, and user have to wait for similar time. as it should not happen.

I think below are some major points that you need to consider
1) Store your search result and give them rating, once you have more resultsets in your table(this table will store rowindex/table information.) you can remove extra search string on bases of that ranking.
2) you need to use SOUNDX[^] for similar searching.
3) You can also implement Extended search method[^](similar in your Stored procedure)
4) Use indexing to improve performance.
5) Get only desired records from database. if you have pagesize 10 in your datagrid then you can fetch only 10 records for every call. do not return all resultset.

If you implement some or all of the above features then you have powerful searching engine for your site. there are more features can be implemented but initially you can use above very quickly.

Best luck
-Amit Gajjar
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900