Autocomplete listbox

Posted on 2005-04-07
Last Modified: 2012-08-13
Hi Experts,
    I'm fairly new to 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!
Question by:gailhl
    LVL 9

    Expert Comment

    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.

    LVL 9

    Accepted Solution


    Author Comment

    Thank you!

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

    Much appreciated,

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now