Solved

AutoCompleteExtender doesn't work

Posted on 2009-07-15
1
562 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Today I am discussing AJAX problems in IE7 and I bet this will helps many guys out here who have problems with AJAX work. Lets start with the discovery of problem and then we will talk about its different solutions. My last two projects included …
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
This video discusses moving either the default database or any database to a new volume.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now