Link to home
Start Free TrialLog in
Avatar of jayh99
jayh99

asked on

Autocomplete Extender Problem

I am having a problem getting an autocomplete extender to work in asp.net.  Below is the code that I am attempting as a test to get it working.  Currently, nothing happens when text is entered into the text box.:

=================
Autocomplete.asmx:
=================
<%@ WebService Language="VB" Class="Names" %>

Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols

' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
' <System.Web.Script.Services.ScriptService()> _
<WebService(Namespace := "http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _  
Public Class Names
    Inherits System.Web.Services.WebService
   
    <WebMethod()> _
    Public Function Names(ByVal prefixText As String, ByVal count As Integer) As String()
        Dim list As New List(Of String)
        For i = 1 To 5
            list.Add(prefixText & " - " & i)
        Next
        Return list.ToArray
    End Function
End Class

=================
Search.aspx:
=================
...
Test: <asp:TextBox ID="TEST" runat="server" />

 <cc1:AutoCompleteExtender runat="server" ID="autoComplete1" TargetControlID="TEST" ServiceMethod="Names" ServicePath="Autocomplete.asmx" MinimumPrefixLength="2" CompletionInterval="1000" EnableCaching="true" CompletionSetCount="20" DelimiterCharacters=";, :" ShowOnlyCurrentWordInCompletionListItem="true"></cc1:AutoCompleteExtender>
...

Thanks in advance for any assistance you can offer!
ASKER CERTIFIED SOLUTION
Avatar of jayh99
jayh99

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
LOL I was just getting ready to post on this. You didn't need to add it, you just needed to uncomment it about 4 lines up from where you added it.