- aspx代码 -
<asp:TextBox class="txtbx" ID="TextBox4" runat="server" placeholder="Blood Group"
onfocus="this.placeholder=''" onblur="this.placeholder='Blood Group'"
BackColor="#F8F8F8"
></asp:TextBox>
<asp:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server"
CompletionInterval="100" MinimumPrefixLength="1"
ServiceMethod="GetCompletionList" TargetControlID="TextBox4"
UseContextKey="True">
</asp:AutoCompleteExtender>
<br />
- 代码背后 -
[System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()]
public static string[] GetCompletionList(string prefixText, int count, string contextKey)
{
string[] bloodgroup = { "A+", "A-", "A1+", "A1-", "A1B+", "A1B-", "A2+", "A2-", "A2B+", "A2B-", "AB+", "AB-", "B+", "B-", "OH+", "OH-", "O+", "O-", "INRA" };
var namelist = from tmp in bloodgroup where tmp.ToUpper().StartsWith(prefixText) select tmp;
return namelist.ToArray();
}
答案 0 :(得分:0)
尝试使用浏览器的开发人员工具,并查找您的选项列表是否以HTML格式填充。如果是,那么您需要做的就是检查该面板的z-index。