Skip to main content
A newer version of this page is available. .
Tab

ASPxButton.CausesValidation Property

Gets or sets a value indicating whether validation (client and server) is performed when the button is clicked.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

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

Property Value

Type Default Description
Boolean **true**

true if validation is performed when the button is clicked; otherwise, false.

Remarks

If the CausesValidation property is set to true (the default value), then a button click forces validation of an editor group, specified via the ASPxButton.ValidationGroup property.

The button’s properties can be used to specify a container for whose controls the button causes validation (ASPxButton.ValidationContainerID), and whether invisible editors should be validated together with visible ones (ASPxButton.ValidateInvisibleEditors).

Note

You should set the CausesValidation property to false when you are using the ASPxButton.PostBackUrl property to post back to a different page. You should explicitly check validation when posting back to a different page.

Example

The complete sample project is available in the DevExpress Code Central database at E557.

...
         <dxe:ASPxButton ID="ASPxButton1" runat="server" AutoPostBack="False" 
         Text="ASPxButton" CausesValidation="False">
         </dxe:ASPxButton>
...

Implements

See Also