I am creating a search tool for students where they can look up courses based on what they enter in search field.
For eg. Lets say I have the following values stored in “Courses” table:
- Math – Calculus I
- Math – Calculus II
- Math – Probability
- Math – Differential Equations
- Math – Stochastic
- Science – Physics
- Science – Biology
- Science – Chemistry
So, as soon as any student starts entering something in search field I want to display a list of possible search items they may be looking for (something like Google). So, if they enter “Mat” I want to display a list of all text that contains “Mat” right below the search field – again, similar to how google displays a list underneath the search field.
How can I achieve this?
Thanks in advance
The AJAX control toolkit released by Microsoft includes a control called the AutoCompleteExtender and from personal use, it’s exactly what you’re looking for, it’s fast and it doesn’t require a lot of setup.
Here’s the basic information page for the toolkit: http://www.asp.net/web-forms/tutorials/ajax-control-toolkit/getting-started/get-started-with-the-ajax-control-toolkit-cs
And here’s the how-to specifically for the AutoCompleteExtender:
http://www.ajaxtutorials.com/ajax-tutorials/using-autocomplete-in-the-ajax-toolkit/