$(".productspecification").autocomplete({
source: '/static/components/autocomplete/listspecification.ashx'
});
這是我的處理程序如何使用自動完成處理
public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "application/javascript";
StringBuilder sbSpecs = new StringBuilder();
string[] lines = System.IO.File.ReadAllLines(HttpContext.Current.Server.MapPath("~/YKIOSK/static/components/autocomplete/specifications.txt"));
ArrayList result = new ArrayList();
foreach (string s in lines)
{
if (s.ToLower().Contains(context.Request.QueryString["term"].ToLower()))
{
result.Add(s);
}
}
context.Response.Write(new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(result));
}
我要到位specifications.txt
where asp.net/asp.net MVC/java? – Anil
它是在asp.net –