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

AutoCompleteExtender not working - function does not fire.

$
0
0

Hey All,

I have been at this for quite some time. I cannot get a textbox to list auto-complete suggestions, whatever I try. The folks at MSDN suggested I post here. Please see the original thread, here: http://social.msdn.microsoft.com/Forums/vstudio/en-US/38b97b18-3413-4cd7-8df6-095fea8c82f7/autocomplete-from-custom-source-6-hours-still-not-working?forum=vbgeneral

.Net Framework 4.5

AJAX Control Toolkit 4.1.9.1213  (2013)
Visual Studio 2013
VB.NET  (ASP.NET 4.5)
MS SQL 2012 (eventually)

End goal is to pull a subset of data from a SQL table, and have it displayed as auto-complete suggestions. The database part is simple enough... it all seems simple enough, it just doesn't work. No errors or warnings, just no auto-complete suggestions at all. 

---

From what I've read, you have to manually add a Class and Web Service/Method. I've tried with, and without that, no result visible either way. 

Any advice / examples would be greatly appreciated.

Resources Used (failed):
http://www.asp.net/ajaxlibrary/act_AutoComplete_simple.ashx
http://www.codeproject.com/Articles/144169/AutoCompleteExtender-with-data-from-ASPX-code-behi
http://www.asp.net/ajaxlibrary/act_autocomplete_simple.ashx

(and many more)

 

Current Code (One of many attempts)

nseac.aspx

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="nseac.aspx.vb" Inherits="easyac8.nseac" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><title>FUUUUUUUUU</title></head><body><form id="form1" runat="server"><asp:ToolkitScriptManager runat="server"></asp:ToolkitScriptManager><div><asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><asp:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="TextBox1" Enabled="True" ServicePath="AutoComplete.asmx" ServiceMethod="GetWordList" MinimumPrefixLength="1" /></div></form> </body></html>

AutoComplete.asmx.vb

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

' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
<System.Web.Script.Services.ScriptService()> _<System.Web.Services.WebService(Namespace:="http://tempuri.org/")> _<System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _<ToolboxItem(False)> _
Public Class WebService1
    Inherits System.Web.Services.WebService<System.Web.Services.WebMethod()> Public Function GetWordList(ByVal prefixText As String, ByVal count As Integer) As String()
        Dim r(1) As String
        r(0) = "Testing0"
        r(1) = "Testing1"
        Return r 'breakpoint here, has never been hit
    End Function
End Class


Please assist.

TIA,

Cato


Viewing all articles
Browse latest Browse all 5678

Trending Articles



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