Solved

AutoCompleteExtender doesn't work

Posted on 2009-07-15
1
572 Views
Last Modified: 2012-05-07
Why does the following does not work?


<asp:ScriptManager ID="ScriptManager1" runat="server" />
   
<asp:TextBox ID="txt" runat="server"></asp:TextBox>
<ajaxToolkit:AutoCompleteExtender ID="ace1" runat="server" TargetControlID="txt"
  ServicePath="test.asmx" ServiceMethod="GetCompletionList"
  MinimumPrefixLength="1"
  CompletionInterval="1000"></ajaxToolkit:AutoCompleteExtender>


I have a test.asmx with the following code:

[WebMethod]
        public string[] GetCompletionList(string prefixText, int count)
        {
            if (count == 0)
            {
                count = 10;
            }

            if (prefixText.Equals("xyz"))
            {
                return new string[0];
            }

            Random random = new Random();
            List<string> items = new List<string>(count);
            for (int i = 0; i < count; i++)
            {
                char c1 = (char)random.Next(65, 90);
                char c2 = (char)random.Next(97, 122);
                char c3 = (char)random.Next(97, 122);

                items.Add(prefixText + c1 + c2 + c3);
            }

            return items.ToArray();
        }


When debugging, the debugger never stops at the WebMethod.

What could be the reason for that?

Thanks
0
Comment
Question by:Relegence
1 Comment
 
LVL 21

Accepted Solution

by:
Tapan Pattanaik earned 500 total points
ID: 24858950
hi Relegence,

                    There is a tutorial , which will guide you to proceed further.

Use the ASP.NET AJAX AutoComplete Control:

http://www.asp.net/learn/AJAX-videos/video-122.aspx


AutoComplete Demonstration:

http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoComplete.aspx

thanks
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Hello World !, Thanks : My Sincere thanks to @Michael Male who encouraged me to write an article on this in my  blog (http://scribblejava.wordpress.com). Introduction:       There are several technical issues a developer may face in his…
jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

837 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