CompareValidator used determine if data that is entered in TextBox control is of type Currency

Q.  Which validation control in ASP.NET can be used to determine if data that is entered into a TextBox control is of type Currency?
- Published on 16 Jun 15

a. ValidationSummary
b. CompareValidator
c. RequiredFieldValidator
d. None of the above.

ANSWER: CompareValidator
 
You can use the CompareValidator control to do a data type check. Set its operator property to DataTypeCheck and its Type property to Currency.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)