Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

AutoComplete Extender fills in IE11 but not in Chrome or Edge #566

Open
mellomel70 opened this issue Jan 21, 2021 · 0 comments
Open

AutoComplete Extender fills in IE11 but not in Chrome or Edge #566

mellomel70 opened this issue Jan 21, 2021 · 0 comments

Comments

@mellomel70
Copy link

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;
    }`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant