Click here to Skip to main content
15,916,527 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,
Iam using autocomplete extender in my page.But the function is not fired while execution.I am using master page in my application.
here is my Code

<asp:TextBox ID="txtDiagnosis"  runat="server"
                               Width="150px"  Font-Bold="True"
                               Font-Size="Medium" Font-Names="Courier New" style="margin-left: 15px"></asp:TextBox>
                           <asp:AutoCompleteExtender ID="txtDiagnosis_AutoCompleteExtender" runat="server"
                              MinimumPrefixLength="3" EnableCaching="false" CompletionSetCount="1" CompletionInterval="100" ServiceMethod="Casesheet.aspx/getDiagnosis"
                               TargetControlID="txtDiagnosis">
                           </asp:AutoCompleteExtender>

code behind
<System.Web.Script.Services.ScriptMethod(), _
 System.Web.Services.WebMethod()> _
    Public Function getDiagnosis(ByVal prefixtext As String) As List(Of String)
        Dim sqlstr As String
        Dim dtable As New DataTable

        Dim diaglist As New List(Of String)
        gappln_data.OpenConnection(gappln_data.appln_cn)

        sqlstr = "select DESCRIPTION from MAJORCODES where DESCRIPTION like '%" & prefixtext & "%"
        dtable = gappln_data.GetArray(sqlstr, gappln_data)
        gappln_data.appln_cn.Close()
        gappln_data.appln_cn.Dispose()
        If dtable.Rows.Count <> 0 Then
            Dim objDiagnosis As String
            For i = 0 To dtable.Rows.Count - 1
                objDiagnosis = dtable.Rows(i).Item(0).ToString
                diaglist.Add(objDiagnosis)
            Next
        End If
        Return diaglist
    End Function


Function getDiagnosis is not firing while execution
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900