Hola a todos, soy nueva en el foro, trabajé muchos años en asp puro y estoy aprendido .net y quisiera pedirles ayuda con los siguiente:
Implementé en un control TextBox la extensión Autocompletar de AJAX, lo hice todo según esta dirección :
http://geeks.ms/blogs/gperez/archive/2009/12/31/tutorial-autocomplete-extender-autocompletando-desde-la-base-de-datos.aspx
hice todo tal cuál ,pero ... no hace nada!!!
Envío por si acaso el código del servicio web, suponiendo que esté con errores, muchas gracias!
-------------------------------
Imports System.Web
Imports System.Web.Configuration
Imports System.Data
Imports System.Data.SqlClient
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel
Imports System.Collections.Generic
' Para permitir que se llame a este servicio web desde un script, usando ASP.NET AJAX, quite la marca de comentario de la siguiente línea.
<System.Web.Services.WebService(Namespace:="http ://tempuri.org/")> _
<System.Web.Services.WebServiceBinding(ConformsTo: =WsiProfiles.BasicProfile1_1)> _
<System.Web.Script.Services.ScriptService()> _
<ToolboxItem(False)> _
Public Class BuscarProveedor
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function ObtenerListaProveedor(ByVal PrefixText As String, ByVal count As Integer) As String()
Dim con As New SqlConnection(ConfigurationManager.ConnectionStrin gs("texincoConnectionString").ConnectionString)
Dim comando As New SqlCommand("select Razon_Social from psBT_proveedor where razon_social LIKE '%' + @param + '%' ", con)
comando.Parameters.AddWithValue("param", PrefixText)
Dim dr As SqlDataReader
comando.Connection.Open()
dr = comando.ExecuteReader
Dim lista As New List(Of String)
While dr.Read
lista.Add(dr.Item("Razon_Social"))
End While
comando.Connection.Close()
Return lista.ToArray
End Function
End Class