1. Home
  2. Computing & Technology
  3. Visual Basic

Using Regular Expressions in ASP.NET

By Dan Mabbutt, About.com

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!

Explore Visual Basic
By Category
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic
  4. Learn VB.NET
  5. Learn ASP.NET
  6. Using Regular Expressions in ASP.NET

©2009 About.com, a part of The New York Times Company.

All rights reserved.