asp.net - Validator jquery not working with updatepanel -


hi problem easy maybe i'm new using jquery. next script work when use updatepanel validation not working , event clic firing. hope me

<script type="text/javascript"> $(document).ready(function() {      $.validator.addmethod("match", function(value, element) {         return this.optional(element) || /^[a-za-z0-9._-]+@[a-za-z0-9-]+\.[a-za-z.]{2,5}$/i.test(value);     }, "por favor ingrese un email válido.");      $("#frmlogin").validate({         rules: {             //this section need place our custom rule                //for control.               <%=inputemail.uniqueid%>: {                 required: true,                 match: true,                 maxlength: 100             },             <%=inputpassword.uniqueid%>: {                 required: true,                 maxlength: 10             },         },         messages: {             //this section need place our custom                //validation message each control.               <%=inputemail.uniqueid%>: {                 required: "ingrese un email",                 match: "ingrese un email válido",                 maxlength: "máximo 100 caracteres"             },             <%=inputpassword.uniqueid%>: {                 required: "ingrese un password",                 maxlength: "máximo 10 caracteres"             },         },     });  }); </script> 

use this

<script type="text/javascript">     sys.webforms.pagerequestmanager.getinstance().add_initializerequest(initializerequesthandler); 
    function initializerequesthandler(sender, args) {         if (args.get_postbackelement().id == '<%= nameyourbutton.clientid%>' && $("#nameyourform").valid() !== true) {          args.set_cancel(true);      }  } </script> 

Comments