문제가 있습니다.'*'문자가있는 경우 AutoCompleteExtender를 비활성화하십시오.
내 텍스트 상자에 AutoCompleteExtender를 사용하고 있습니다. 모든 자동 완성 단어가 표시됩니다. 하지만 다음 행동이 필요합니다 : '*'문자가있는 텍스트 상자에 자동 완성 단어가 표시되어서는 안됩니다.
어떻게하면됩니까?
문제가 있습니다.'*'문자가있는 경우 AutoCompleteExtender를 비활성화하십시오.
내 텍스트 상자에 AutoCompleteExtender를 사용하고 있습니다. 모든 자동 완성 단어가 표시됩니다. 하지만 다음 행동이 필요합니다 : '*'문자가있는 텍스트 상자에 자동 완성 단어가 표시되어서는 안됩니다.
어떻게하면됩니까?
ServiceMethod에서 문자열에 와일드 카드가 있는지 확인하고 결과를 반환하지 않을 수 있습니까?
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public string[] GetCompletionList(string prefixText, int count) {
string[] results = null;
if (string.IndexOf("*") == -1) {
// Retrieve your autocomplete options here.
// Create a new string[] and add the options.
}
return results
}
세트 DelimiterCharacters = "*"
<cc1:AutoCompleteExtender OnClientItemSelected="ace1_itemSelected" EnableCaching="true"
DelimiterCharacters="*" EnableViewState="false" Enabled="true" UseContextKey="true"
ServicePath="PurchaseOrderDetails.aspx" ServiceMethod="GetItemTypes" MinimumPrefixLength="1"
CompletionInterval="100" CompletionListCssClass="AutoCompleteExtender_CompletionList"
CompletionListHighlightedItemCssClass="AutoCompleteExtender_HighlightedItem"
CompletionListItemCssClass="AutoCompleteExtender_CompletionListItem" CompletionSetCount="5"
TargetControlID="txtItemTypeCode" ID="aceItemTypeCode" runat="server">
</cc1:AutoCompleteExtender>
추천