How to make auto-complete in city text box

I have a dropdown list of state and city in an ASP.NET 3.5 application. However, I want the city to be a textbox and when I type it the autocomplete mode should appear.

I want to implement it via jQuery, so can anyone send me the code to do this?

+2


a source to share


3 answers


http://docs.jquery.com/UI/Autocomplete



+4


a source


$("#yourtextboxID").autocomplete({source: ["Los Angeles","Las Vegas","Madrid"]});



0


a source


The easiest way is to use the jQuery Autocompleye plugin .

If that doesn't tickle your fancy, try checking this question out . If you are having trouble with Asp.NET combined with jQuery and AJAX it looks like this question might also be helpful.

0


a source







All Articles