System.Web.UI.WebControls.ImageButton.CausesValidation Property

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

Syntax

[System.Web.UI.Themeable(false)]
[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.WebControls.ImageButton 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.WebControls.ImageButton control is clicked by using the ImageButton.CausesValidation property. To prevent validation from being performed, set the ImageButton.CausesValidation property to false.

This property is commonly set to false for a Reset or Clear button to prevent validation from being performed when the button is clicked.

When the value of the ImageButton.CausesValidation property is set to true, you can also use the ImageButton.ValidationGroup property to specify the name of the validation group for which the System.Web.UI.WebControls.ImageButton control causes validation.

This property cannot be set by themes or style sheet themes. For more information, see System.Web.UI.ThemeableAttribute and ASP.NET Themes Overview.

Requirements

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