Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

148
Views
ASP.Net Searchable/Filterable DropDownList Populated from the Database

I am attempting to search through a DropDownList. The list is populated from the database and not in any explicit front end list. For previous searches, I have used OnKeyUp in a textbox to search through rows. However, in this case there is no search textbox- the search must be done when the user clicks/hovers over the filter. Additionally, and less importantly, the search needs to start after the dash symbol (-) as items in the list start with acronyms as displayed here:

XYZ - Kansas

YBE - Delaware

CIT - New Jersey

The code:

<ASP:DropDownList ID="ddlProgram" AutoPostBack="true" runat="server" />

Any thoughts on this? I found some useful code that may be relevant here but it seems to require a textbox as input and a front end list but the logic seems sound:

function searchSel() 
    {
      var input = document.getElementById('realtxt').value.toLowerCase();

          len = input.length;
          output = document.getElementById('realitems').options;
      for(var i=0; i<output.length; i++)
          if (output[i].text.toLowerCase().indexOf(input) != -1 ){
          output[i].selected = true;
              break;
          }
      if (input == '')
        output[0].selected = true;
    }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!