As long as there are three files:
A js plug-in autocomplete.js and two autocomplete.css files, which are plug-ins provided by the jquery official website;
Their download address: http://jqueryui.com/ demos/autocomplete/
One is the general processing program;
The other is the apsx page, look at the code below;
Front desk:
The background is a general handler:
public class LoginTest : IHttpHandler
{
string str;
public void ProcessRequest(HttpContext context)
{
getUserName();
context. Response.Write(str);
}
public bool IsReusable
{
get
{
return false;
}
}
private void getUserName( )
{
DataSet ds = SqlHelper.BuildDataSet("select * from login", CommandType.Text);
str = ConvertJson.ToJson(ds);
}
}
Run result: