when i hit the but for next paragraph, it doesnt work on this textbox
<script type="text/javascript">
$(function () {
$("[id*=Textpost]").on("keypress", function (e) {
if (e.which != 13) {
var textarea = $(this)[0];
textarea.oninput = function () {
textarea.style.height = "";
textarea.style.height = Math.min(textarea.scrollHeight, 582) + "px";
};
}
else {
document.forms[0].submit();
return false;
}
});
});
</script>
<div class="col-lg-12">
<asp:TextBox ID="Textpost" runat="server" class="form-control" placeholder="Thoughts..." Style="" Rows="1" cols="20" BorderStyle="Solid" Font-Bold="False"
autofocus="autofocus" Wrap="True" Width="100%" BorderColor="#8CC6FF" BorderWidth="1px" TextMode="MultiLine" onkeyup="return CountCharacters();"></asp:TextBox>
</div>