How to use the CompareValidator control?
Posted on 2006-05-31
I need to implement a text box control with following validation rules:
(1) It should not be blank
(2) It should NOT equal to the string "Please enter your name here"
For first condition, I use Required field validator, it works fine.
For second condition, I think about using CompareValidator. But I need assistance on
(1) How do you set the property of "control to compare"? It compares to itself, actually. Do we need to set it anyway?
(2) How to set the property "Value to compare"? I set it to be the string above. But how do you set condition evaluation to be TRUE or FALSE?