How do I list all generated errors in the same div?
Something like this:
<div id="errors">
<ul>
<li>Email is invalid</li>
<li>Firstname is required</li>
</ul>
</div>
How do I list all generated errors in the same div?
Something like this:
<div id="errors">
<ul>
<li>Email is invalid</li>
<li>Firstname is required</li>
</ul>
</div>
Try using
<%=Html.ValidationSummary()%>
There is a section about it in this article: http://www.asp.net/mvc/tutorials/performing-simple-validation-cs