CompareValidator and RequiredFieldValidator

  • Thread starter Thread starter buran
  • Start date Start date
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
 
Hi Buran...
You need to use Requiredfield Validator to check whether User entered value or not.
 
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
 
Back
Top