1. When you press enter in any web form, is equivalent with submit button click, so the entire page is submitted to the controller and in your case the
Index <br />
method is invoked for manage the saving.
2.The solution is to disable this default behavior, and to force the user to press the button if he/she want to submit the page. Here you could find the details:
http://forums.asp.net/t/1227095.aspx[
^]
3.You should add the next JavaScript function in your view ( or .js file):
function noenter() {
return !(window.event && window.event.keyCode == 13);
}
Then, in your view, modify your text area and link it with this JS function:
<textarea cols="4" rows="4" class="col-sm-4" id="txtChatConversation" onkeypress="return noenter();"></textarea>