문제

I am using autocomplete extender.

the problem is when the user begins typing the 2nd word and selects the autocomplete suggestion, then it replaces the 2nd word with the suggestion, but leaves the first word.

I type 'Cherry Cobbler'

Auto complete shows "Desert, Cherry Cobbler, 1 Slice"

When I click the auto complete suggestion it finalizes in my textbox as "Cherry Desert, Cherry Cobbler, 1 Slice". The first word cherry should not be there.

Any Ideas?

<asp:TextBox ID="txtLunch" CssClass="headerinput" runat="server" AutoPostBack="True" OnTextChanged="txtLunch_TextChanged"></asp:TextBox>   <strong id="quantitylunch" runat="server" style="font-family: Arial; font-size: 12px; padding-right: 5px; padding-left: 5px;">Quantity</strong>    
                            <ajaxToolkit:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" UseContextKey="true" ContextKey="" Enabled="True" ServicePath="/service/service1.asmx" ServiceMethod="GetFoodNames" MinimumPrefixLength="1" CompletionSetCount="10" TargetControlID="txtLunch" CompletionInterval="500" CompletionListCssClass="autocomplete_completionListElement" CompletionListItemCssClass="autocomplete_listItem" CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem" DelimiterCharacters=";, :" ShowOnlyCurrentWordInCompletionListItem="true">
                </ajaxToolkit:AutoCompleteExtender>
도움이 되었습니까?

해결책

I found the answer, remove " " the space from the delimiter.

DelimiterCharacters=";,:" 
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top