Link to home
Start Free TrialLog in
Avatar of ITsolutionWizard
ITsolutionWizardFlag for United States of America

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>
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Please do not send me a link.
You are restricting the possible answers to this question.

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.
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?
ASKER CERTIFIED SOLUTION
Avatar of Sanjay Radadiya
Sanjay Radadiya
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ITsolutionWizard

ASKER

asmx may be not my first choice but your sample codes work to me so I can still use it. Thanks