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

ASPxEdit.Validate() Method

Performs the editor’s validation.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

public void Validate()

Remarks

This method allows you to programmatically perform validation of the editor control.

Example

<dx:ASPxLabel ID="lbl" runat="server" Text="E-mail:">
</dx:ASPxLabel>
<dx:ASPxTextBox ID="ASPxTextBox1" runat="server" Width="170px">
     <ValidationSettings ValidateOnLeave="False">
          <RequiredField ErrorText="E-mail is required" IsRequired="True" />
     </ValidationSettings>
</dx:ASPxTextBox>
<dx:ASPxButton ID="btn" runat="server" Text="Submit" onclick="btn_Click" CausesValidation="False">
</dx:ASPxButton>
protected void btn_Click(object sender, EventArgs e) {
     ASPxTextBox1.Validate();
}
See Also