$(function () {
debugger;
$('#CustomerID').autocomplete({
source: function (request, response) {
$.ajax({
url: '@Url.Action("GetVisitCustomer", "VisitorsForm", new { Area = "Sales" })',
type: "GET",
datatype: "json",
data: {
term: request.term
},
success: function (data) {
response($.map(data, function (item) {
return {
label: item.CustomerID,
value: item.DisplayName
}
}))
}
})
},
messages: {
noResults: "", results: ""
}
});
});