2013-07-19 46 views
0

只有在IE中,當用戶滾動自動完成結果時,會觸發文本框回發。我在Chrome或FF中沒有問題。AutoCompleteExtender在滾動時導致回傳

<asp:TextBox ID="txtBreakfast" ClientIDMode="Static" CssClass="headerinput" AutoPostBack="true" runat="server" OnTextChanged="txtBreakfast_TextChanged"></asp:TextBox> 

<ajaxToolkit:AutoCompleteExtender ID="txtBreakfast_AutoCompleteExtender" runat="server" UseContextKey="true" ContextKey="" Enabled="True" ServicePath="/service/service1.asmx" ServiceMethod="GetFoodNames" MinimumPrefixLength="1" CompletionSetCount="10" TargetControlID="txtBreakfast" CompletionInterval="500" CompletionListCssClass="autocomplete_completionListElement" CompletionListItemCssClass="autocomplete_listItem" CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem" DelimiterCharacters=";,:" ShowOnlyCurrentWordInCompletionListItem="true"> 
</ajaxToolkit:AutoCompleteExtender> 

如何它應該工作: 用戶開始輸入的食物,然後從擴展DIV選擇食物,然後回傳occures,它會導致基於食品要顯示附加的數據庫信息。

回答

0

我只是用jQuery UI的,我沒有發現任何解決方案給在自動完成回發,它在IE中不起作用。

我在網上看了一下,這就是結論

0

如果刪除

AutoPostBack="true" runat="server" OnTextChanged="txtBreakfast_TextChanged" 

它的工作原理?文本框中的文本改變

後(您從下拉列表中的值)OnTextChanged事件觸發..