Asp.net-mvc – Disable Client Side validation for one submit button in ASP.NET MVC4

asp.net-mvcasp.net-mvc-4razor

I have created the view in MVC 4.0 and i have placed four text boxes and two submit buttons, one for create and one for cancel. Validation should be occur for the text boxes while i am clicking the create button. while clicking the cancel button, we need disable the validation. in ASP.NET, we can achieve this by setting the CausesValidation = false for the cancel button.
in MVC 4.0, how we will achieve this?
Could you please help me on this.

Thanks

Best Answer

Just add class="cancel" to the button

For example,

<input type="submit" name="btnCancel" value="Cancel" class="cancel"/>

Updated

Use this link to identify which submit button has been pressed.