u have add this function in aspx
$(document).ready(function() {
$.ajax({
type: "POST",
url: "/Service/Service.asmx/getItem",
dataType: "json",
data: "{}",
contentType: "application/json; charset=utf-8",
success: function(data) {
var datafromServer = data.d.split(":");
$("[id$='txtautofromDB']").autocomplete({
source: datafromServer
});
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert(textStatus);
}
});
}
Hope this link will help us to solve your issue
3 Different Approaches for Implementing the JQuery Autocomplete with ASP.NET[
^]