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">
<table align="center" width="100%">
<tr>
<td>
<div class="formtext_modal">Select a Client / Matter Below <img src="images/v2/modal_cm.png" alt="Client Matter Files" /></div><br />
<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<string> 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;
}
enter code here
question from:
https://stackoverflow.com/questions/65834176/ajax-autocomplete-extender-fills-in-ie11-but-not-in-chrome-or-edge 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…