Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Ajax AutoCompleteExtender Triggers Button OnClick Event

$
0
0

I've configured the following AutoCompleteExtender and corresponding TextBox control in an UpdatePanel on my .aspx page:

<asp:TextBox  ID="TextBox1" runat="server" OnTextChanged="TextBox1_TextChanged"  AutoPostBack="true"></asp:TextBox>
                               

<asp:AutoCompleteExtender ID="TextBox1_ACE"  runat="server" TargetControlID="TextBox1"
                                    MinimumPrefixLength="1" CompletionSetCount="30" ServiceMethod="FilterData" UseContextKey="True"
                                    CompletionListCssClass="CompletionListCssClass" /> 

When I set "AutoPostBack" to false, the result is that pressing the ENTER button in the TextBox triggers the OnClick event of whatever <asp:Button> that is next to the TextBox in the DOM tree. I've swapped out different buttons, and verified that the TextBox is triggering the OnClick event of  any adjacent asp:Button control. Has anyone ever seen this behaviour?

-Courtney


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>