title: How to check if Html.ValidationSummary has a value when using client-side validation
body: <p>I'm building something in MVC4. Want to make this work:</p>
  
  <pre><code>  @if (!Html.ViewData.ModelState.IsValid)
    {
      &lt;div class="alert alert-danger"&gt;
          @Html.ValidationSummary(false)
      &lt;/div&gt;
    }
  </code></pre>
  
  <p>I understand this will be fine if the form is submitted to the server, but I'm actually trying to apply to to the user account login page. I want to show the validation summary within a DIV that uses some CSS courtesy of Bootstrap.</p>
  
  <p>What happens when I apply this is the individual @Html.ValidationMessageFor helpers appear when I submit the form - it's like my @Html.ValidationSummary doesn't exist. The form does not post back to the server as validation failed at the client level and is picked up by jQuery validation, thus the page never reloads and is not able to apply the conditional logic.</p>
  
  <p>Is there a method for getting this to work using the helpers or would a better approach be to use some jQuery to hide/show the DIV?</p>
  
  <p>Thanks in advance.</p>