title: Validation occured after Successfull Submission
body: <p>I want to validate a textbox field. The validation controls works well when I remove the return false at the end of the javascript. But removing return false does not submit the data. I also observed that when I use return false the data is successfully submitted but the validation is checked after data is submitted.</p>
  
  <pre><code>function ConvertToImage(btnExport) {
    html2canvas($("#myDIV")[0]).then(function(canvas) {
      var base64 = canvas.toDataURL();
      $("[id*=hfImageData]").val(base64);
      __doPostBack(btnExport.name, "");
    });
    return false;
  }
  
  &lt;asp:TextBox runat="server" ID="custom_Name" Height="50px" ValidationGroup="vg" Width="250px"&gt;&lt;/asp:TextBox&gt;&lt;br /&gt;
  &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Font-Size="X-Large" ControlToValidate="custom_Name" ErrorMessage="Please Enter Product Name" ValidationGroup="vg"&gt;&lt;/asp:RequiredFieldValidator&gt;
  &lt;br /&gt;
  &lt;asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="Only Alphabets are Allowed" Font-Size="X-Large" ControlToValidate="custom_Name" ValidationExpression="[a-zA-Z ]*$" ValidationGroup="vg"&gt;&lt;/asp:RegularExpressionValidator&gt;
  &lt;!--Button for save image start--&gt;
  &lt;asp:HiddenField ID="hfImageData" runat="server" /&gt;
  &lt;asp:Button ID="btnExport" Text="Export to Image" runat="server" CausesValidation="true" OnClick="ExportToImage_Click" OnClientClick="return ConvertToImage(this)" CssClass="btnstyle" ValidationGroup="vg" Height="50px" Width="200px" /&gt;
  &lt;!--Button for save image ends--&gt;
  </code></pre>