I m trying to implement autocomplete for a textbox using the following code, but it s not working: (The ajax call to MyUrl works fine and returns a json string made of List of strings)
$(document).ready(function () {
$(".searchbox").autocomplete({
source: function (request, response) {
$.ajax({
url: "/MyUrl/" + request.term.toLowerCase(),
dataFilter: function (data) { return data; },
success: function (data) {
return data;
}
});
},
minLength: 1
});
});
这是否正确?