I an using jQuery validation plugin in asp.net 4.0 application.
I have two button on page 1)Submit 2)Cancel
When i click on Submit button this validate the form and show appropriate error message.
I used Cancel button to go back to previous page.
But now when i click on Cancel button it also show the error message.
I don’t want to validate the form on Cancel button click.
How can we do that.
Thanks.
Without seeing your code, I would assume that your “Cancel” button is also
input[type=submit]. Change it toinput[type=button]instead, then handle it appropriately.For example, your “Submit” button may look like this:
Whereas, your “Cancel” button is like: