Question

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>
Was it helpful?

Solution

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

DelimiterCharacters=";,:" 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top