My layout is much simplified if I can only render parts of it when I need to display my validation summary.
The problem is that you can't use IsValid as it will throw if accessed before validation has occurred.
ViewData.ModelState.IsValid is false by default, so that won't work.
The only thing I've found that works is
<%if (this.ViewData.ModelState.Values.Where(x => x.Errors.Count > 0).Count() > 0)
{%>
this kinda sucks. I'm looking for a better version of this. Is it out there?