Solved

AutoCompleteExtender doesn't work

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

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…
Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

778 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