MikeTech
MikeTech

Reputation: 1

Search while typing

I have a textbox and a listbox. The listbox is filled by a sqldatasource and I want to be able to filter out the listbox based on what's typed in the textbox. The filtering/searching works but ONLY once the textbox loses focus.

What I need is the listbox to filter/search WHILE I am typing and not require the textbox to lost focus.

Upvotes: 0

Views: 286

Answers (2)

rj_26
rj_26

Reputation: 1

I hope you have focus at the end of the character because abstractly speaking, there is no way to find out automatically when user will stop typing, so everything goes during typing.

Are trying to do this this with Jquery? or Ajax?

Upvotes: 0

AD.Net
AD.Net

Reputation: 13399

If you are doing this yourself, i.e. no third party tools, you need to catch the textchanged event and update the source yourself based on what's typed. It's probably better if you use 3rd party tool or do this via javascript or at least ajax call to have better user experience.

Upvotes: 1

Related Questions