What is a RegularExpressionValidator?
RegularExpressionValidator control is used to check a value against a regular expression. It checks whether the value of the associated input control matches the pattern of the regular expression. This Control generally used to check whether the entered phone number or email address matches a set format. A notable property of this control is the ValidationExpression property, which is used to set the validation criteria and which comes with some predefined formats.To work with a RegularExpressionValidator control; Drag a TextBox and a Command Button from the ToolBox. Our intention is to check for the format of an email address and display an error message if the input format is not correct. An example of a correctly formated inpput would be "xyz@programmersheaven.com". To implement format definition. In the properties window of the Regularexpression click on the ellipse button for ValidationExpression and select Internet E-mail Address from the pop-up window. When you run the program and enter a value not in the format of abc@xyz.com the error message is displayed.
Written by Sandeep Mogulla, Webmaster at www.startvbdotnet.com
Index
Sponsored links
Villanova University Six Sigma & IT Certificate Programs
100% Online programs in Six Sigma, IS Security, CISSP Prep, Business Analysis, Proj. Mgmt. and more!
100% Online programs in Six Sigma, IS Security, CISSP Prep, Business Analysis, Proj. Mgmt. and more!
ASP.NET 3.5 Hosting on Windows 2008!
ASP.NET 3.5/2.0 Hosting on Windows 2008 & 2003! AJAX, LINQ, & Silverlight Ready! 3 Mo. Free!!
ASP.NET 3.5/2.0 Hosting on Windows 2008 & 2003! AJAX, LINQ, & Silverlight Ready! 3 Mo. Free!!
SFTP components for .NET
Add complete SSH and SFTP support to your .NET framework application
Add complete SSH and SFTP support to your .NET framework application
PureCM Software Configuration Management
Version control and integrated issue tracking - powerful and easy to use. Get your FREE trial now!
Version control and integrated issue tracking - powerful and easy to use. Get your FREE trial now!
Virtual File System SDK
Create your own file systems in Windows and .NET applications
Create your own file systems in Windows and .NET applications
