1. Computing & Technology

Discuss in my forum

Using Regular Expressions in ASP.NET

By , About.com Guide

7 of 7

Client Side RegEx Validation
Client Side VBScript

Regular Expression Validation Using Client Side VBScript

In addition to "server side" matching, ASP.NET will trigger client side matching as well if the EnableClientScript property of RegularExpressionValidator is True. A VBScript version of client side scripting is shown and OnTextChanged="ValidateText" must be added to the asp:TextBox tag (ValidateText is the name of the subroutine in the VBScript). Note that both client side and server side validation messages are shown in the example page.

So ... Get Regular and start coding your own regular expression validation. It's just one of the many ways that .NET is adopting tools that have worked in the rest of the world for years!

©2012 About.com. All rights reserved.

A part of The New York Times Company.