Restrict user from entering unlimited characters in a multiline textbox

First of all add following code inside <head> tag ::

<script type="text/javascript" src="//"></script>
<script type="text/javascript">
    $(function () {
        $('#txtdesc').keypress(function (e) {
            var txt = $(this).val();
            if (txt.length > 90) {

Now add code in <body> tag ::

       Enter Address(Should be Less than 90 Chars) <asp:TextBox ID="txtdesc" runat="server" TextMode="MultiLine"></asp:TextBox>


Post a comment

Popular posts from this blog

Search data in Gridview on Textbox Key press event using JQuery in Asp.Net- C#

Dumps for Microsoft Dynamics CRM MB2-703 Practice Exam Questions Free

StateCode and StatusCode Values for mostly used entities in Microsoft Dynamics CRM 2013

How to show enlarge image when mouse hover on image or link in Asp.Net(c#) using JavaScript

Show GridView row details in tooltip on mouseover with jQuery using inside GridView in c#

go to top image