Amazon Ad

Saturday 9 February 2013

Validate ASP.NET validation controls using javascript

Hi,
Sometimes when using both asp.net controls and javascript/jquery there is a need of running both asp.net validation control and our javascript code simultaneously without postback. Below is the code for validating this. The Page_ClientValidate() function actually validates and returns true or false based on the form's validations.

<script type="text/javascript">
      var Done = 1;
      function validate() {
          if (Page_ClientValidate()) {
              if (Done == 1) {
                  return true;
              }
              else {
                  return false;
              }
          }
          else {
              return false;
          }
      }




<script>
<asp:Button id="btnSubmit" runat="server" Text="Submit" onclick='validate()'/>
  </script>

How to implement Captcha v3 in ASP.NET

 I was facing an issue of dom parsing in my website. I finally resolved it by using Google Captcha V3. Step 1: Get your keys from https:...