On this page you can test how my RestrictedTextArea Control works.

The RestrictedTextArea control below has its MaxLength property set to 30 and a PrettyFieldName of "Control's Pretty Name". The PrettyFieldName is used to generate the ErrorMessage displayed on a ValidationSummary control if Javascript is disabled on the browser and the user exceeds the MaxLength of the RestrictedTextArea.

To test the RestrictedTextArea entirely, do the following:

  1. Enter more than 30 chars on the text below. Chances are your browser has Javascript enabled right now so you'll see the javascript validation in action.

  2. Now let's test the server side validation and the automatic generation of the ErrorMessage for the ValidationSummary by going through the following steps:
    1. Disable the Javascript on your browser
    2. Enter more than 30 chars on the RestrctedTextArea below
    3. Hit the Submit button