Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
![]()  | 
Gets or sets whether the targets of the SemanticItemToValidate and SemanticItemToCompare properties are both marked invalid when the compare operation fails. Read/write.
Usage
| ASP.NET markup: | <speech:CompareValidator InvalidateBoth="..." /> | 
| Get value: | Boolean = CompareValidator.InvalidateBoth; | 
| Set value: | CompareValidator.InvalidateBoth = Boolean; | 
| Data type: | System.Boolean | 
| Required: | No; Default: False | 
Remarks
When InvalidateBoth is not specified or set to False, only the SemanticItemToValidate is invalidated. If ValueToCompare is specified instead of SemanticItemToCompare, InvalidateBoth is ignored.
Example
<form ID="Form1" method="post" runat="server">
  ...
  <Speech:CompareValidator ID="TestV1" Type="Integer" runat="server" 
    SemanticItemToValidate="siValue1" Operator="GreaterThan" ValueToCompare="256" >
    <Prompt InlinePrompt="Value1 must be greater than 256"></Prompt>
  </Speech:CompareValidator>
  <Speech:CompareValidator ID="TestV2" Type="Integer" InvalidateBoth="True" runat="server" 
    SemanticItemToValidate="siValue2" Operator="GreaterThan" SemanticItemToCompare="siValue1" >
    <Prompt InlinePrompt="Value2 must be greater than Value1"></Prompt>
  </Speech:CompareValidator>
  ...
</form>
See Also
CompareValidator Class | CompareValidator Constructor | CompareValidator Members | CompareValidator Properties | CompareValidator Methods | CompareValidator Events | CompareValidator Remarks
.jpg)