How to use Regular Expressions ?
-
i m doing an ASP.NET Web Application...i would like to know how to use regular expressions for validating phone no, email id, date...etc.. please give an example
-
i m doing an ASP.NET Web Application...i would like to know how to use regular expressions for validating phone no, email id, date...etc.. please give an example
-
i m doing an ASP.NET Web Application...i would like to know how to use regular expressions for validating phone no, email id, date...etc.. please give an example
-
It sounds as though you could just use ASP.Net's built in validators - which will do phone number and email format validations for you with no extra code required. Scott Stocker
-
i m doing an ASP.NET Web Application...i would like to know how to use regular expressions for validating phone no, email id, date...etc.. please give an example
ASP.Net supports a RegularExpression Validator . Using RegularExpression validator We can validate a text box based on a particular format
set
controlToValidate
to the textbox.
setValidationExpression
(here we can select a predefined expression or create a custom one).Net Namespace System.Text.RegularExpression supports a RegEx class to manage validation through code
-
i m doing an ASP.NET Web Application...i would like to know how to use regular expressions for validating phone no, email id, date...etc.. please give an example
Go to Studio.Net IDE and select the reg exp control. Place it where you want your error msg to appear close to the control to validate. Edit the following properties for reg exp control 1) Error Msg 2) Control to Validate 3) Validation Expression That should do most of your job. Else reg exp is topic of research by itself...!!! ---------- user9 A student knows little about a lot. A professor knows a lot about little. I know everything about nothing.