Click here to Skip to main content
Sign Up to vote bad
good
See more: ASP.NET
I am new to ASP.Net. Trying to build a project for Airline ticketing system. I need a lot of help as I have many questions.

I would like to bother you with a problem that may be simple for you, But for me, it means a lot.
 
question 1:. First, I made a registration form with some fields.

some fields require numbers such as big integer as input. Which validation method will be better to use there?
RequiredFieldValidator or RegularExpressionValidator?
 
Moreover, I do not understanding the task of RegularExpressionValidator
 
EDIT: formatting and title. Old title: I would like to be helped.
Posted 8 Jan '13 - 20:35
Edited 8 Jan '13 - 20:59

Comments
GeekBond - 9 Jan '13 - 2:48
'I would like to be helped' is not a good title, use the 'Improve question' widget (the little green button) below your question to update the title.

3 solutions

RequiredFieldValidator is to validate the mandatory fields. So for all the fields that are mandatory you will have to put a RequiredFieldValidator.
 
RegualrExpressionValidator is for checking the input. you can use regular expression to accept only valid inputs and save yourself from checking the inputs serverside. For all the controls that need some specific type of input like number only or alphanumeric only you will have to use this.
 
Now if any control is mandatory and need specific input type you will have to use both. Refer this for details:
 
Understanding ASP.NET Validation Techniques[^]
  Permalink  
use comparevalidator for integer check and use requiredfieldvalidator for mandatory field
  Permalink  
Hi,
 
Please check the below links this might be help for you
 

Validator Controls in ASP.NET[^]
 
Validator Controls in ASP.NET[^]
 
Exploring ASP.NET Validation Controls[^]
 

http://msdn.microsoft.com/en-us/library/debza5t0(v=vs.100).aspx[^]
 
u check this links this might be help for you .
 
Before ask the question once please check with google from your side.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 8,123
1 OriginalGriff 6,040
2 CPallini 3,432
3 Rohan Leuva 2,703
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid