I have a form where users scan in a barcode, the barcode reader automatically enters a carriage return in the value causing the form to submit since the browser chooses the
Set the TextBox to have the text mode property set to "multiline". Then the carriage return will be in the TextBox.
See also here for a note about what to do if you're using FireFox.