CompareValidator and RequiredFieldValidator

B

buran

Dear ASP.NET Programmers,

I am using a CompareValidator control to check the values entered into a
texbox. The textbox is for currencies, so the property Operator is set to
DataTypeCheck and the Type property is set to Currency. However, I would
like to control check whether the user enters a value or not. Do I have to
add an RequiredFieldValidator? Can't CompareValidator handle this?
Thanks in advance,

Burak
 
G

Guest

Hi Buran...
You need to use Requiredfield Validator to check whether User entered value or not.
 
M

Martin Marinov

Taken from MSDN :
Note If the input control is empty, no validation functions are called and
validation succeeds. Use a RequiredFieldValidator control to require the
user to enter data into the input control.

this answer your question
Regards
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top