Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Updated 8-Jan-13 20:59pm
v3
Comments
Akinmade Bond 9-Jan-13 2:48am    
'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.

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[^]
 
Share this answer
 
use comparevalidator for integer check and use requiredfieldvalidator for mandatory field
 
Share this answer
 
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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900