I am trying to create a mobile website, where there is a search box, and let’s say we enter a couple of letters “ad”, it will search a list in the view model for items containing “ad” and provide a drop down underneath the search, and for it to change as more letters are typed.
I am completely stumped on this, as a beginner programmer, at the moment I have a SelectList in my view model, that displays everything on my select list in the view.
I have tried of different ways to do this, for example having a partial view with the drop down list, using jquery to post the value entered in the search, and display the partial view that will contain a brand new list, but there must be a more efficient way of doing this?
I have also tried playing around with Json, but I can’t seem to figure out how to keep the previously generated list in the event the user enters more letters.
Thanks guys, please let me know if I need to provide more info, or code samples.
Have you checked out http://jqueryui.com/demos/autocomplete/