When you set a default button using Asp.Net, have a Textarea on the form and are using FireFox a user can't hit the enter key to create a new line. Instead what happens is the form tries to submit itself. With every other input field this is desired but with a Textarea you want the user to be able to press the enter key to get a new line instead of submitting the form.
Some examples I've seen simply kill the enter key anywhere it's used on the form. That means you can't have the submit behavior work at all on the page or even have the enter key create a new line. The trick is to use cancelBubble on the Textarea itself. CancelBubble will tell every parent element to ignore this input while still allowing the key press into the Textarea.
Code: <asp:TextBox ID="MyTextBox" TextMode="MultiLine" runat="server" onkeypress="return KeyPressReturnCancelBubble(event);" />
Code: <script language="javascript" type="text/javascript">
function KeyPressReturnCancelBubble(event) {
var intKeyCode = (event.keyCode ? event.keyCode : (event.which ? event.which : event.charCode));
if (intKeyCode == 13) {
event.cancelBubble = true;
}
return true;
}
</script>