Skip to content Skip to sidebar Skip to footer

Html 5 Required Validator Triggers On All Buttons On The Form

Solution 1:

Add formnovalidate tag in each buttons html code.

<asp:ImageButtonID="Cancel"runat="server"ImageUrl="~/Images/ClaimForm/btnCancel.gif"OnClick="btnFallBack_Click"Visible="False"ToolTip="Cancel"draggable="false"formnovalidate="formnovalidate" />

Solution 2:

I solved it by assigning an onclick function to that button and adding:

event.preventDefault();

Solution 3:

try this.

use a input button - where set the type as button and make it to run as server

ex: // this will trigger the required for text boxes

//this button will not.

Post a Comment for "Html 5 Required Validator Triggers On All Buttons On The Form"