Button CausesValidation Property


Button Control Button Control

Definition and Usage

The CausesValidation property specifies if a page is validated when a Button control is clicked.

Page validation is performed when a button is clicked by default.

This property is mostly used to prevent validation when a cancel or reset button is clicked.

Syntax

<asp:Button CausesValidation="TRUE|FALSE" runat="server" />


Example

Example

The following example removes validation when a button is clicked:

<form runat="server">
<asp:Button id="button1" runat="server"
CausesValidation="FALSE" Text="Cancel" />
</form>

Show example »


Button Control Button Control

Color Picker

colorpicker