ITsolutionWizard
asked on
asp.net autocomplete, jquery
I have below codes and I need to have autocomplete in jquery. just assume someone will type letter M for autocomplete.
How can I do that? Please do not send me a link. Just send me jquery codes that I can try to put them together.
[WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json)]
List<string> ShowBookDetails();
public List<string> ShowBookDetails()
{
List<string> x = new List<string>();
x.Add("John");
x.Add("Mary");
return x.ToList();
}
default.aspx
<form id="form1" runat="server">
<input id="txtID" type="text" runat="server" />
</form>
How can I do that? Please do not send me a link. Just send me jquery codes that I can try to put them together.
[WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json)]
List<string> ShowBookDetails();
public List<string> ShowBookDetails()
{
List<string> x = new List<string>();
x.Add("John");
x.Add("Mary");
return x.ToList();
}
default.aspx
<form id="form1" runat="server">
<input id="txtID" type="text" runat="server" />
</form>
There's also the ASP.NET AJAX AutocompleteExtender control (which is part of the Ajax Control Toolkit)
Is there a reason why you're not using that?
Is there a reason why you're not using that?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
asmx may be not my first choice but your sample codes work to me so I can still use it. Thanks
There are two popular options for autocomplete
JQueryUI http://jqueryui.com/autocomplete/
Twitter Typeahead https://twitter.github.io/typeahead.js/
A google search will show others but the above are popular
To provide code we would need to know what library you intend on using. Otherwise not much we can do to assist.
My advice - have a look at the examples provided by each of these libraries, select one and then come back here with specific questions.