Hi
I have searched and searched but cannot find the setting that allows my AutoCompleteExtender to function when deployed to the server. It works as desired on my computer. Also, other Ajax controls (always visible and AjaxFileUpload) I am using work correctly on the server.
I am using AjaxControlToolkit.16.1.0.0 and Visual Studio 2015 Express.
Thanks in advance for any help.
markup for the AutoCompleteExtender
<asp:Panel ID="RenamePanel" runat="server" Visible="false">
<table id="Table1" runat="server">
<tr>
<td>
<asp:Image ID="ImageRename" runat="server"
Height="400px"
style='border:1px solid #000000'/>
</td>
<td style="vertical-align:bottom">
<asp:label ID="RenameImageName" runat="server"></asp:label>
<br /><br />
<asp:TextBox ID="RenameTextBox" runat="server" width="1000px" MaxLength="275"> </asp:TextBox>
<br />
<asp:Button ID="RenameButton" runat="server"
onclientclick="RenameImage"
Text="Rename Image!" />
</td>
</tr>
</table>
<cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server"
TargetControlID="RenameTextBox"
ServiceMethod="GetNameList"
ServicePath="../WebService.asmx"
MinimumPrefixLength="2"
CompletionInterval="100"
CompletionSetCount="10">
</cc1:AutoCompleteExtender>
</asp:Panel>
code in WebService.asmx file
<System.Web.Script.Services.ScriptService()>
<WebService(Namespace:="http://mywebsite.net/")>
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)>
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Public Class WebService
Inherits System.Web.Services.WebService
<WebMethod()>
Public Function GetNameList(ByVal prefixText As String, ByVal count As Integer) As String()
Dim conString As String = General.ConString
Dim queryString As String = ""
queryString = "SELECT DISTINCT TOP 11 Name FROM Table_images " _
& "WHERE Name like '%" & prefixText & "%' ORDER BY Name"
Dim adapt As New Data.SqlClient.SqlDataAdapter(queryString, conString)
Dim table As New Data.DataTable
adapt.Fill(table)
Dim row As Data.DataRow
Dim items As New List(Of String)
If table.Rows.Count > 0 Then
For Each row In table.Rows
items.Add(HttpUtility.HtmlDecode(row(0)))
Next
End If
Return items.ToArray()
End Function
and finally my update to the web.config file
<system.webServer>
<handlers>
<!-- added for ajax -->
<add name="AjaxFileUploadHandler" verb="POST" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit" />
<!-- added for ajax -->
</handlers>