javascript - Asp.net DropDownList Search Query Repopulate on input -


i'm trying develop asp.net application have dropdownlist control - upon typing in dropdownlist's input box (which i'm struggling working) - fill automatically top 30 results in query db.

the db services set , upon each key event following c# code run:

protected void loadfiltereddropdown(string term) {     // list     var activefilteredlist = services.staticlists.master.cli.active_filtered_list(term);      // fill dropdown     ddlclientfiltered.items.clear();     ddlclientfiltered.items.add(new listitem("- select", "0"));     ddlclientfiltered.appenddatabounditems = true;     ddlclientfiltered.datasource = activefilteredlist;     ddlclientfiltered.databind();     ddlclientfiltered.selectedindex = 0;      // indicate whether or not there more results     searchresultcount = activefilteredlist.count;     if (searchresultcount > 30)     {         lblresults.text = "top 30 results (refine search more)";     }     else     {         lblresults.text = "all results matching search";     } } 

i have following dropdownlist control setup:

<asp:dropdownlist id="ddlclientfiltered" runat="server" cssclass="form-control"     datatextfield="desc" datavaluefield="id" width="350px"/> 

how can allow input field on dropdownlist control (or alternative solution) can run this? assume i'd have js right , i'm prepared that.


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -