I'm trying to set up jQuery Autocomplete, I wrote this code:
$("#name_input").autocomplete({ source: 'Home/MessageHandler', minLength: 1, select: function (event, ui) { log("Selected: " + ui.item.value); } }); }); And such a controller (using ASP .Net Core):
public JsonResult MessageHandler() { string result = "[{label:'string1',value:'string2'},{label:'string3',value:'string4'}]"; return Json(result); } If I go directly to the controller: http: // localhost: 3140 / Home / MessageHandler then everything is OK, I get the line:
[{label:'string1',value:'string2'},{label:'string3',value:'string4'}] But if you enter a request into the input to which the autocomplit event is connected, autocomplete does not appear , and the download icon appears in the input line, which no longer disappears from there (see screen3). I attach server response screens:



