Imagine we have a form that contains many form fields. If that page contains
errors, it could be difficult for users to figure out which control caused a given
error, because the page is so big. The ValidationSummary control can alleviate
this problem by presenting the user with a list of error messages in one place on
the page. Let’s see the ValidationSummary control in use. Add it to the end of
your Login.aspx file, like so:
File: Login.aspx (excerpt)
<!-- Submit Button -->
<asp:Button id="submitButton" runat="server" Text="Submit"
<!-- Validation Summary -->
<asp:ValidationSummary id="vSummary" runat="server" />
When the user clicks the Submit button, the ValidationSummary is populated
automatically with a list of all the errors on the page, as we can see in Figure 6.7.
Figure 6.7. Using the ValidationSummary control