hi, sorry for my english,
i have a problem with autocomplete extender
this is code that have in aspx page:
<body>
<form id="form1" runat="server">
<ajaxToolkit:ToolkitScriptManager runat="server" ID="tollkit" EnablePageMethods="True"></ajaxToolkit:ToolkitScriptManager>
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<ajaxToolkit:AutoCompleteExtender ID="autocompleteextender" TargetControlID="TextBox1" runat="server" ServiceMethod="SearchCustomers" UseContextKey="True"></ajaxToolkit:AutoCompleteExtender>
</div>
</form>
</body>
and this in code behind.
Public Shared Function SearchCustomers(ByVal prefixText As String, ByVal count As Integer) As List(Of String)
Dim DBconn As New OleDbConnection
DBconn.ConnectionString = String.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0}mdb-database\prova\auto.mdb;")
DBconn.Open()
Dim DBComm As OleDbCommand
DBComm = DBconn.CreateCommand()
DBComm.CommandType = CommandType.Text
DBComm.CommandText = "select nomi from Tabella1 where" & " nomi like @SearchText + '%'"
DBComm.Parameters.AddWithValue("@SearchText", prefixText)
DBComm.ExecuteReader()
Dim customers As List(Of String) = New List(Of String)
Dim sdr As OleDbDataReader = DBComm.ExecuteReader()
While sdr.Read
customers.Add(sdr("nomi").ToString)
End While
DBconn.Close()
Return customers
End Function
but when i write the textBox not complete.
Wy?