Maxlength for textbox via server side regex


/ Published in: C#
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <asp:RegularExpressionValidator ID="regexTextBox1" ControlToValidate="YourTextBoxID" runat="server" ValidationExpression="^[\s\S]{0,6000}$" Text="6000 characters max" />

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.