AutoCompleteExtender won't work

I have search overall for a solution, but it still dosen’t work and im really confused.

I can start my project, but when i write some letters in my textbox, nothing happens!

Webservice.asmx:

<System.Web.Services.WebService(Namespace:="http://tempuri.org/")> _
<System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<System.Web.Script.Services.ScriptService()>
Public Class WebService
    Inherits System.Web.Services.WebService

    <System.Web.Services.WebMethod> _
    <System.Web.Script.Services.ScriptMethod> _
    Public Function GetSearchExtenderValues(prefixText As String, count As Integer) As String()

        Dim names As New StringCollection()
        names.Add("kristian2")
        names.Add("jens")
        names.Add("kristian")
        Dim namesarray As [String]() = New [String](names.Count – 1) {}
        names.CopyTo(namesarray, 0)
        Return namesarray

    End Function

Site.Master:

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %>

    <asp:ScriptManager runat="server" EnablePartialRendering="true" EnablePageMethods="true">
        <Services>
            <asp:ServiceReference Path="~/WebService.asmx" />
        </Services>
        <Scripts>

Default.aspx:

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %>

            <asp:TextBox id="SearchDevice" runat="server" OnTextChanged="Search_TextChanged">
            </asp:TextBox>
            
            <ajaxToolkit:AutoCompleteExtender ID="Search_AutoCompleteExtender" runat="server" TargetControlID="SearchDevice"

                ServicePath="WebService.asmx" ServiceMethod="GetSearchExtenderValues" MinimumPrefixLength="1" EnableCaching="false" CompletionSetCount="5"
                CompletionInterval="1000" >
            </ajaxToolkit:AutoCompleteExtender>

I really tried a lot of options, but i really can’t get it to work. any sugestions?

Leave a Reply