I have a List<string>
in my Model C# filled on runtime, called @Model.Names
in my Views.
After filling that list I want to fill an array in javascript from values of that list, in order to do the following:
var myArray = [];
//fill myArray with values from @Model.Names
$("#tags").autocomplete({
source: myArray
});
So when the user types in <input id="tags">
he will get an autocomplete with a list of the names I filled on runtime.
Any idea how to do so?