Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1770
  • Last Modified:

Autocomplete listbox

Hi Experts,
    I'm fairly new to asp.net and I would like to provide an autocomplete-style search capability in a listbox that has hundreds of items in it.  The web listbox control's default behavior navigates the listbox by the first letter only, which in this case is insufficient.  
    I thought to use a textbox, and then findstring with the listbox - and that's when I discovered that the web control listbox doesn't have findstring.

    Does anyone know another (preferably quick to implement) method?

Thanks in advance!
  • 2
1 Solution
Javascript will be your only way of doing this......

and no it's not particularly easy....  

You'd have to create a textbox and then a listbox next to it, and then on the onChange property of the textbox, filter the listbox depending on what has been entered in the textbox.

gailhlAuthor Commented:
Thank you!

Wish there was an easier way but I guess I'll just have to bite the bullet...

Much appreciated,

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now