Checking multiple forms

If all asp.net controls need to be on a form in order to be generated, how can you use the jquery validation plugin with multiple forms on the same page?

What I mean is how can I have two forms containing asp controls that can be validated independently using jquery validation?

0


a source to share


2 answers


Confirm everything:

$("form").validate();

      



... or just forms with a specific class:

$("form.validateMe").validate();

      

+1


a source


The problem here is that you need two forms in the first place. ASP.NET, as far as I know, forces you to put all the controls in one form.

So don't check the validation at all. JQuery validation will be easy (see Craig's answer). The two forms in ASP.NET are a different story.



Perhaps you could hack it with an iframe or something, but I would suggest doing it.

+1


a source







All Articles