Hi,
I have a textbox with multiline in a wizard control:
<asp:TextBox ID="txtCA" TextMode="MultiLine" runat="server" Height="100px" Width="400px"></asp:TextBox>
The textxtbox is is second step of wizard i.e Navigation step. I want to limit the no. of characters entered in textbox.
Jquery:
<script type="text/javascript" language="javascript">$(document).ready(function () { var MaxLength = 10;$('#<%= txtCA.ClientID %>').keypress(function (e) { if ($(this).val().length >= MaxLength) { e.preventDefault(); } }); });</script>
But's its not working, what could be the reason ?