Bonjour à tous,
J'essaye de faire une TextBox avec une AutoComplete en passant par Ajax.Je me suis inspiré d'un ancien post et j'ai une erreur que j'arrive pas à corriger
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  Public Function GetCompletionList(ByVal prefixText As String, ByVal count As Integer)
        'Dim conn As New OleDbConnection(PCEConn)
        Dim conn As New Data.SqlClient.SqlConnection("Initial Catalog=ARIANE;Data Source=SRV-BACKUP;Trusted_Connection=True")

        Dim mycommand As New Data.SqlClient.SqlCommand
            Dim rs As Data.SqlClient.SqlDataReader
             Dim items As New List(Of String)

        Dim strsql As String = "SELECT T_huissiers.Huissier_nom FROM T_huissiers WHERE Huissier_nom LIKE '" & Replace(prefixText, "'", "''") & "%' ORDER BY T_huissiers.Huissier_nom ASC"
        mycommand.Connection = conn
        mycommand.CommandText = strsql
        Try
            conn.Open()
            rs = mycommand.ExecuteReader
            If rs.HasRows Then
                Do While rs.Read
                    items.Add(rs("Huissier_nom"))
                Loop
            End If
        Catch ex As Exception
            items.Add(ex.ToString)
        Finally
            mycommand.Dispose()
            conn.Close()
            conn.Dispose()
        End Try
        Return items.ToArray
    End Function
Le message:
Type 'List' non défini
Merci pour vos posts.