title: Hide redundant error message in ASP.Net ValidationSummary
body: <p>I have a asp.net page accepting two input values – Name and Address. Both of them are required fields. I have used required field validators and validation summary. </p>
  
  <p>When user does not enter both the values the error message if fired two times though the error message is redundant. I need to display only one error message even though there are two errors. </p>
  
  <ol>
  <li>How can we handle it using jQuery?</li>
  <li>How can we handle it using ASP.Net markup?</li>
  </ol>
  
  <p><strong>Note</strong>: I initially thought that the validation control will be emitting HTML while page load itself so that I can use "view source" and do jQuery on HTML elements. But it is not. It renders only as follows</p>
  
  <pre><code> &lt;div id="vsumAll" class="validationsummary" style="display:none;"&gt; &lt;/div&gt;
  </code></pre>
  
  <p>Result</p>
  
  <p><img src="https://i.stack.imgur.com/7kjTD.jpg" alt="enter image description here"></p>
  
  <p><strong>ASP.Net Markup</strong></p>
  
  <pre><code>&lt;body&gt;
  &lt;form id="form1" runat="server"&gt;
  &lt;div&gt;
      &lt;table cellpadding="5" cellspacing="5" width="100%"&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;table border="0" align="center" cellpadding="0" cellspacing="0" width="100%"&gt;
                      &lt;tr&gt;
                          &lt;td&gt;
                              Name
                          &lt;/td&gt;
                          &lt;td&gt;
                              &lt;asp:TextBox runat="server" ID="txtName"&gt;&lt;/asp:TextBox&gt;
                              &lt;asp:RequiredFieldValidator runat="server" ID="reqWorkorderFormat" ControlToValidate="txtName"
                                  Text="*" ErrorMessage="Fill all values!"&gt;&lt;/asp:RequiredFieldValidator&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td&gt;
                              Address
                          &lt;/td&gt;
                          &lt;td&gt;
                              &lt;asp:TextBox runat="server" ID="txtAddresss"&gt;&lt;/asp:TextBox&gt;
                              &lt;asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="txtAddresss"
                                  Text="*" ErrorMessage="Fill all values!"&gt;&lt;/asp:RequiredFieldValidator&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td colspan="2"&gt;
                              &lt;asp:Button runat="server" ID="btnSave" Text="Save" /&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td colspan="2"&gt;
                              &lt;asp:ValidationSummary runat="server" ID="vsumAll" DisplayMode="BulletList" CssClass="validationsummary" /&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;/table&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>