The ValidationSummary tag is used to group the display of all validation messages generated by <validate>
tags. The tags' message
will be displayed in the validation summary, while the tags' text
value will be displayed in place of the <validate>
tag.
<ValidationSummary
BackColor="color name|#dddddd"
BorderColor="color name|#dddddd"
BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge|Inset|Outset"
BorderWidth="size"
CssClass="string"
DisplayMode="List|BulletList|SingleParagraph"
EnableClientScript="True|False"
Font-Bold="True|False"
Font-Italic="True|False"
Font-Names="string"
Font-Overline="True|False"
Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium|Large|X-Large|XX-Large"
Font-Strikeout="True|False"
Font-Underline="True|False"
ForeColor="color name|#dddddd"
HeaderText="string"
Height="size"
Width="size" />
In the example below, a Rage Validator has been placed on the form in addition to a Validation Summary. The Range Validator has its message
set to "You can only order between 1 and 5 tickets" and has its text
set to "**". When validation fails, the Range Validator will display "**" next to the text box, while the Validation Summary, below the form's button, will display the error message. If there were additional validation errors, they would also be displayed in the Validation Summary.
<addform>
...
<table>
<tr>
<td>
<label for="txtQuantity" text="Number of Tickets" />
<textbox id="txtQuantity" datafield="Quantity"
datatype="int32" />
<validate type="range" target="txtQuantity" minimumvalue="1" maximumvalue="5" message="You can only order between 1 and 5 tickets" type="Integer" text="**"/>
</td>
</tr>
<tr>
<td colspan="2">
<addbutton text="Place Order"/> <cancelbutton
text="Cancel"/><br />
<validationsummary displaymode="BulletList" cssclass="NormalRed" headertext="Errors:"/>
</td>
</tr>
</table>
</addform>