I'm doing an input with an AutoComplete function, but typing it returns on the console with a 404 error. Here's the code:
$(document).ready(function () {
$("#ListaNCM").autocomplete({ source: "ListaAuto.ashx" });
});
And the Generic Handler:
public class ListaAuto : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
string input = context.Request.QueryString["term"];
ProjetoEntities db = new ProjetoEntities();
var Lista = db.Item.Where(x => x.DESCRICAO.Contains(input)).ToList();
context.Response.Write(new JavaScriptSerializer().Serialize(Lista));
}
public bool IsReusable
{
get
{
return false;
}
}
If someone can help me where I'm wrong, I appreciate it.