Back to Devexpress

ASPxButton.CausesValidation Property

aspnet-devexpress-dot-web-dot-aspxbutton-c2316ad1.md

latest2.7 KB
Original Source

ASPxButton.CausesValidation Property

Gets or sets a value indicating whether the button click initiates validation (client and server).

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(true)]
public virtual bool CausesValidation { get; set; }
vb
<DefaultValue(True)>
Public Overridable Property CausesValidation As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true, if the button click performs validation; otherwise, false.

|

Remarks

By default, a button click forces validation of an editor group that is specified by the ASPxButton.ValidationGroup property.

Note

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

You can use the following API to specify validation settings:

Example

aspx
<dx:ASPxButton ID="ASPxButton1" runat="server" AutoPostBack="False" Text="ASPxButton" CausesValidation="False" />

Implements

CausesValidation

See Also

Validation

ValidationGroup

ValidationContainerID

ValidateInvisibleEditors

How to: Validate a Group of Editors

ASPxButton Class

ASPxButton Members

DevExpress.Web Namespace