Ciao a tutti
Sto utilizzando typeahead.js per un autocomplete.
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
context.Response.Expires = -1;
string result = "{}";
string type = context.Request["type"];
switch (type)
{
case "localita":
List<tipoLocalitaTuristica> localita = LocalitaTuristica.Elenco("ON", 0);
result = JsonConvert.SerializeObject(localita);
break;
default:
break;
}
context.Response.ContentType = "text/plain";
context.Response.Write(result);
}
Quando scrivo all'interno della textbox ricevo questo errore:
TypeError: this.source is not a function
this.source(query, render);
nel file 'typeahead.bundle.js'
Grazie mille