Я пытаюсь использовать расширитель автозавершения ajax, но он не работает .... Я поставил точку останова на метод GetCompanyNames в веб-сервисе, но он даже не достиг точки останова.
Вот мой ajax autoextender
<asp:TextBox TabIndex="1" ToolTip="* Required - enter the Company name" ID="txtCompanyName"
runat="server"></asp:TextBox>
<ajaxToolkit:AutoCompleteExtender runat="server" ID="acCompanyName" TargetControlID="txtCompanyName" ServiceMethod="GetCompanyNames" ServicePath="~/WebServices/AutoComplete.asmx" MinimumPrefixLength="1"
EnableCaching="true">
</ajaxToolkit:AutoCompleteExtender>
Вот веб-сервис, который я создал
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)> _
<System.Web.Script.Services.ScriptService()> _
Public Class AutoComplete
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function HelloWorld() As String
Return "Hello World"
End Function
<WebMethod()> _
Public Function GetCompanyNames(ByVal prefixTest As String) As String()
Dim db As New DataClassesDataContext
Dim company = From c In db.CT_Companies
Where c.CompanyName.Contains(prefixTest)
Select c.CompanyName
Return company.ToArray
End Function
End Class
Кто-нибудь может увидеть, что я делаю неправильно или отсутствует?Спасибо