ASP.NET LinkButton / ImageButton and JQuery Validate?

后端 未结 2 1837
无人及你
无人及你 2020-12-17 16:07

We are introducing JQuery to an existing ASP.NET application and use the Validate plugin for JQuery to do the client side validation (we do

相关标签:
2条回答
  • 2020-12-17 17:07

    Not sure if this will help, but give it a shot...

    http://docs.jquery.com/Plugins/Validation/validate#options

    $("input[type=image]").click(function() {
       $($(this).parents(form)).validate();
    });
    

    You might need to replace the "form" with something more specific, but I tried to get it as accurate as possible without knowing how everything's laid out on your page. Reply if this helps!

    0 讨论(0)
  • 2020-12-17 17:10

    The first suggestion might still work because you can cause the postback to fire using Javascript after the validation occurs.

    The javascript is:

    __doPostBack('<%= YourImageControl.UniqueID %>','');
    

    The second empty parameter can be used to pass arguments.

    0 讨论(0)
提交回复
热议问题