What is the best way to provide "search as you type"?

I'm porting a Forms app to a VB.NET web app, and one of the feature the users really liked was the ability to narrow the possible choices as the user typed in a search box. The search itself goes against multiple tables and columns (and takes several seconds), so it's not a simple AutoComplete or anything. What's the best way to allow the user to type, and asynchronously update a ListView with the matches?

Answers


JQuery will be a good solution to filter the ListView at client side. Check this recent article and another cool demo here


You should be able to use the Dynamic Populate control in the AJAX Control Toolkit to do most of the legwork.


Check out the ASP.NET AJAX controls. There is a specific control for autocompletion:

AutoComplete is an ASP.NET AJAX extender that can be attached to any TextBox control, and will associate that control with a popup panel to display words that begin with the prefix typed into the textbox.

The dropdown with candidate words supplied by a web service is positioned on the bottom left of the text box.

In the sample above, the textbox is associated with an AutoCompleteExtender that pulls words that start with the contents of the textbox using a web service.

When you have typed more content than the specified minimum word length, a popup will show words or phrases starting with that value. Caching is turned on, so typing the same prefix multiple times results in only one call to the web service.

http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoComplete.aspx

There is also a control for searching lists, as you described.


Need Your Help

If this but not that, then if that but not this... Logic

jquery logic

I'm trying to get a button (input field or button field) value each time a form is submitted. I think I'm having some logic issues though because the second one does not work.

How to dynamically update directive once user is logged in?

javascript angularjs twitter-bootstrap angularjs-directive

I have an app with a navbar directive and basic sign up/log in functionality. I want to change some of the words on the nav bar (from 'signup/login' to 'sign out') once the user is logged in, but I...