I have a textbox whose input is being handled by jQuery.
$('input.Search').bind('keyup', updateSearchTextbox);
When I press Enter in the textbox, I get a postback, which messes everything up. How can I trap that Enter and ignore it?
(Just to preempt one possible suggestion: The textbox has to be an <asp:textbox ... /> – I can’t replace it with an <input ... />.)
Your browser is automatically submitting the form when you press enter. To cancel this, add return false to your updateSearchTextBox function.
if that doesn’t work, try this:
And in your codebehind: