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

UploadedFile.IsValid Property

Gets a value indicating whether the uploaded file passes the validation criteria defined via the ASPxUploadControl.ValidationSettings property.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

NuGet Package: DevExpress.Web

Declaration

public bool IsValid { get; set; }

Property Value

Type Description
Boolean

true if the file is valid; otherwise, false.

Remarks

Use the IsValid property to verify whether the uploaded file has passed the built-in validation whose criteria can be defined using the ValidationSettings property. Typically, the IsValid property can be used to determine whether a file is valid before saving the file (using the SaveAs(String) method, for instance).

Note that if an uploaded file’s validation fails, the IsValid and isValid properties are also automatically set to false.

<dx:ASPxUploadControl ID="UploadControl" runat="server" ClientInstanceName="UploadControl" 
  OnFilesUploadComplete="UploadControl_FilesUploadComplete" ...>
...
</dx:ASPxUploadControl>

Online Demo

ASPxUploadControl - Custom Progress Panel

The following code snippets (auto-collected from DevExpress Examples) contain references to the IsValid property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also