Form Validations

wdqdtn1914

New Member
In order to validate a Form, I want to take care of the following things:<BR><BR>1. Allow only letters (both upper & lower case); no number & special characters in a particular field<BR>2. Email address should have '@' & '.'<BR>3. No space anywhere in the UserID<BR>4. In the password field & re-enter password field, both the passwords should be identical to each other.<BR>5. In the Telephone No. field, telephone no. cannot be zero. Also should have whole numbers only; no letters & special characters<BR>6. Also none of the Form fields can start with a space<BR><BR>How do I validate the above using ASP.NET?<BR><BR>Thanks,<BR><BR>Arpanhttp://www.4guysfromrolla.com/webtech/090200-1.shtml<BR>Start with this article on ASP.NET form input validation.<BR>Part way down is a link to the index of articles on Regular Expressions. Most of what you want, you can achieve using ASP.NET's RegularExpressionValidator control type.<BR><BR>Cheers,<BR><BR>A. P.
 
Back
Top