Live Chat Icon For mobile
Live Chat Icon

How to force the max no. of characters in a multiline TextBox using RegularExpressionValidator

Platform: ASP.NET| Category: TextBox

<asp:TextBox id='TextBox1' style='Z-INDEX: 101; LEFT: 0px; POSITION: absolute; TOP: 112px' runat='server' TextMode='MultiLine'></asp:TextBox>
<asp:RegularExpressionValidator id='RegularExpressionValidator1' style='Z-INDEX: 102; LEFT: 216px; POSITION: absolute; TOP: 112px'
	runat='server' ErrorMessage='MaxLength is 20' ControlToValidate='TextBox1' 	ValidationExpression='^\w{1,20}
>
</asp:RegularExpressionValidator>

Share with

Share on twitter
Share on facebook
Share on linkedin