I have an asp:TextBox and I want to validate that the number of characters typed in by the user is not more than 250 characters.
Because it's a multiline TextBox the MaxLength
property does not work. At the moment I only see the option to use a CustomValidator with checking TextBox1.Text.Length
on server side and perhaps in addition some Javascript client side validation.
But isn't there a simpler way to do this, using the standard ASP.NET validators (RegularExpressionValidator, RangeValidator, CompareValidator, etc.)?
Thanks in advance!