Erkan Demir Erkan Demir -4 years ago 148
Ajax Question

MVC 6 autocomplete Free Text search single input with multiple columns

I have two tables

. When typing in the textbox i would like to retrieve two columns from
table and 1 column from
table. Here is an e.g of the search parameters.

--- CategoryName Suburb State ----

Can someone please advise on how i should tackle this.


Answer Source

For autocomplete purpose you can use the jQuery Autocomplete tool, it is easy to implement.

Now to get the data while autocomplete, you can use a cache mechanism(considering you dont have bulk data to come up as autocomplete feature..) around the database. An api(GET) functionality can be useful here.

In case the user need to see something that does not appear in autocomplete, a "GetData" or "Search" functionality will be needed that actually hits the database and updates the cache to help future users.

Hope it helps.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download