?
Solved

AutoCompleteExtender doesn't work

Posted on 2009-07-15
1
Medium Priority
?
578 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 2000 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

There is basically two types of AJAX request in mootools. Request  and Request.HTML Request: Request is the basic XHR request class in MooTools. While not extremely useful on its own, it provides the basic functionality for both Request.HTM…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month7 days, 21 hours left to enroll

765 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