Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

AutoCompleteExtender won't work

$
0
0

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?


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>