i am trying to run a autocomplete function and get the data however i am end up getting an error that is "internal server error 500"
my client side code is the below please help
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js">
</script>
<script src="../Scripts/jquery-ui.js"></script>
<link href="../Scripts/jquery-ui.css" rel="stylesheet" />
<script type="text/javascript">
$(document).ready(function () {
debugger;
$("#txtautocomplete").autocomplete({
source: function (request, response) {
debugger;
var txtname = $("#txtautocomplete").val();
alert(txtname);
$.ajax({
url: "../EmployeeService.asmx/GetAllEmpBYName",
method: "post",
data: JSON.stringify({ term: txtname }),
ContentType: "application/json;charset-utf-8",
dataType: "json",
success: function (data) {
response(data.d);
}, error: function (err) {
// alert(err.error);\
alert(err);
}
});
}
});