AjaxControlToolkit icon indicating copy to clipboard operation
AjaxControlToolkit copied to clipboard

AutoComplete Extender fills in IE11 but not in Chrome or Edge

Open mellomel70 opened this issue 4 years ago • 0 comments

I'm using Ajax Control Toolkit v20 in an ASP.Net 4 web page. Specifically, I'm using the AutoComplete Extender. It works fine in IE11 but when I run it in Chrome or Edge the list of items does not appear. The Service Method does fire and retrieve data, but no popup shows up. I've added z-index: 10000001; and position: relative; to each of the css classes I'm using for the extender, but the behavior doesn't change. Here's my front-end code: `<asp:Panel ID="panelMatter" runat="server" CssClass="modalPopupAttorneys" align="center">

Select a Client / Matter Below Client Matter Files

<ajax:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txtClient" MinimumPrefixLength="1" EnableCaching="true" CompletionSetCount="10" CompletionInterval="1000" ServiceMethod="GetClient"
CompletionListCssClass="list2" CompletionListItemCssClass="listitem2" CompletionListHighlightedItemCssClass="hoverlistitem2"> </ajax:AutoCompleteExtender> <asp:Label ID="LblClient" runat="server" Width="595px" Text="Client"></asp:Label>
        <asp:TextBox ID="txtClient" runat="server"  Width="600px" AutoPostBack="true" OnTextChanged="txtClient_TextChanged" Height="18px"></asp:TextBox>
            
   </td>  
 </tr>
 <tr>
    <td><br />
        <asp:Label ID="lblMatters" runat="server" Text="Matter(s)"></asp:Label>
        <div  style="BORDER: thin solid; OVERFLOW: auto; WIDTH: 600px; HEIGHT: 300px"> 
          <asp:CheckBoxList  ID="lstMatters" runat="server" >
          </asp:CheckBoxList>
        </div>
       
         <asp:HiddenField ID="HiddenField1" runat="server" />
     </td>
 </tr>
 
 </table>

   `

And here's my server-side code: `[System.Web.Services.WebMethod] [System.Web.Script.Services.ScriptMethod()] public static List GetClient(string prefixText, int count) {

        String scommandtext = "";

        if (Regex.IsMatch(prefixText, @"^\d+$"))
        {
            scommandtext = "SELECT ClientName,ClientNum FROM vw_ClientWithMatters WHERE ClientNum  like '%" + prefixText + "%' ";

        }
        else
        {
            scommandtext = "SELECT ClientNum,ClientName FROM vw_ClientWithMatters WHERE ClientName  like '%" + prefixText + "%' ";
        }

        DataTable dt =  LHClassLibrary.LHDataAccessLayer.ExecuteSelect(scommandtext, false);

        List<string> ClientNames = new List<string>();
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            ClientNames.Add(dt.Rows[i][1].ToString());
        }

        return ClientNames;
    }`

mellomel70 avatar Jan 21 '21 18:01 mellomel70