2009-07-28 4 views

답변

5

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 
} 
0

세트 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> 
추천
관련 문제