2009-07-28 5 views

Répondre

5

Dans votre ServiceMethod vous pouvez vérifier la chaîne pour la présence du caractère générique, et ne renvoyer aucun résultat?

[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

set DelimiterCharacters = "*"

comme

<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> 
Questions connexes