Solved

asp.net auto complete with jquery

Posted on 2014-09-25
4
138 Views
Last Modified: 2014-10-02
I try to build auto complete jquery based on the below codes.
Can you tell me what I need to do?
I am new to jquery thanks

public static string[] GetBrand(string prefixText, int count)
        {
            List<string> productList = GetProductListByKeyword(prefixText, count);
            var list = from p in productList
                       where p.Contains(prefixText)
                       select p;
            string[] prefixTextArray = list.ToArray<string>();
            return prefixTextArray;
        }
        public static List<string> GetProductListByKeyword(string prefixText, int count)
        {
            try
            {                 
                    List<string> brandNames = new List<string>();                   
                    brandNames.Add("apple");
                    brandNames.Add("orange");
                    brandNames.Add("manago");
                    return brandNames;                
            }
            catch (Exception ex)
            {
                throw new ApplicationException("Something wrong in the query/database connection: ", ex);
            }

        }        
//aspx-----------------
<asp:TextBox runat="server" ID="keyword"></asp:TextBox>

Open in new window

0
Comment
Question by:ITsolutionWizard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 40344736
Click here : http://jqueryui.com/autocomplete/#remote
And on "View Source link"
0
 
LVL 1

Author Comment

by:ITsolutionWizard
ID: 40344759
No. that is not .net page and you have to show me the codes here.
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 40344763
are you able to test you current service? what did it return ?
0
 
LVL 1

Author Comment

by:ITsolutionWizard
ID: 40344968
it is not a service and it is working
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Asp response.write to clients 6 34
JS library vs Js framework 11 24
javascript and jquery question 4 26
Ajax on ASP 2 42
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question