Solved

AutoCompleteExtender doesn't work

Posted on 2009-07-15
1
576 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
[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
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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…
OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

705 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