Validation

ASP.NET supports both client-side and server-side validation. ASP.NET enables client-side validation by writing certain javascript into the page. Anthem enables client-side validation by injecting that same javascript into an existing page. Anthem removes client-side validation by removing critical pieces of that javascript.

This page demonstrates several validation controls using both server-side and client-side validation. Note the following limitations in ASP.NET (don't blame Anthem):

  • ASP.NET 1.0 and 1.1 only support client-side validation if you have Internet Explorer (you can create a <browserCaps> element block in your web.config to enable client-side validation with other browsers, but the validation scripts will probably not work).
  • ASP.NET 1.0 and 1.1 ignore the ValidatonGroup parameter. Even though this page will run in ASP.NET 1.x, all the validators will fire for every validation.

There is a panel directly below the toggle button. All of the validation controls are in the panel.



The next three buttons are plain ASP.NET Button's that cause postbacks. These are used to verify that Anthem creates a page that that works for both callback and postback controls.