Maxlength for Multiline Textbox in Asp.net

Rajesh_Kumar
Posted by Rajesh_Kumar under jQuery category on | Points: 40 | Views : 821
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js">
</script>
<script type="text/javascript">
$(function() {
$('#txtdesc').keypress(function(e) {
var txt = $(this).val();
if (txt.length > 50) {
e.preventDefault();
}
});
});
</script>


<asp:TextBox ID="txtdesc" TextMode="MultiLine" runat="server" ></asp:TextBox>

Comments or Responses

Login to post response