System.Web.UI.HtmlControls.HtmlButton.CausesValidation Property

Gets or sets a value indicating whether validation is performed when the System.Web.UI.HtmlControls.HtmlButton control is clicked.

Syntax

[System.ComponentModel.DefaultValue(true)]
public virtual bool CausesValidation { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

By default, page validation is performed when an System.Web.UI.HtmlControls.HtmlButton control is clicked. Page validation determines whether the input controls associated with a validation control on the page all pass the validation rules specified by the validation control.

You can specify or determine whether validation is performed on both the client and the server when an System.Web.UI.HtmlControls.HtmlButton control is clicked by using the HtmlButton.CausesValidation property. To prevent validation from being performed, set the HtmlButton.CausesValidation property to false.

This property is commonly used in the event handler for the HtmlButton.ServerClick event to prevent page validation from occurring when a Cancel or Reset button is clicked.

Requirements

Namespace: System.Web.UI.HtmlControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0