• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 776
  • Last Modified:

Ajax AutoCompleteExtender VB.NET

Hi, I use a autocompleteextender for a multiline textbox and it doesn't work but the debug won't show me any errors.
Thks for youtr help

<asp:ToolkitScriptManager ID="ScriptManager1" runat="server">
                                    <asp:ServiceReference Path="MyService.asmx" />
                            <asp:TextBox ID="txtDescAdd" runat="server" Width="537px" Height="111px" TextMode="MultiLine"></asp:TextBox>
                            <asp:AutoCompleteExtender runat="server" ID="autoComplete1" TargetControlID="txtDescAdd"
                                ServicePath="MyService.asmx" ServiceMethod="GetDescription" MinimumPrefixLength="1"
                                EnableCaching="true" />


    Public Function GetDescription(ByVal prefixText As String, ByVal count As Integer) As String()
        Dim strSql As String = ("SELECT top " + count + " id_ts, description from timesheet where id_user = " + ADTools.GetUserID(My.User.Name).ToString + " and description like '" + prefixText + "%'")
        Dim conn = New SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionTS").ConnectionString)
        Dim command = New SqlCommand(strSql, conn)
        Dim reader As SqlDataReader = command.ExecuteReader
        Dim temp As New List(Of String)
        While reader.Read
            temp.Add(CType(reader("description"), String))
        End While
        Return temp.ToArray()
    End Function
End Class

Open in new window

  • 2
1 Solution
jeebee75Author Commented:
Mohamed AbowardaSoftware EngineerCommented:
Could you please tell me what was unclear in the answer to choose the grade "B"?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now