Click or drag to resize
ValidateFileEventArgsIsValid Property
Gets or sets whether the value specified by UploadedFile property passed validation.

Namespace: Kettic.AspNet.Controls.Upload
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
public bool IsValid { get; set; }

Property Value

Type: Boolean
true to indicate that the value specified by the UploadedFile property passed validation; otherwise, false
Remarks

Once your validation routine finishes, use the IsValid property to indicate whether the value specified by the UploadedFile property passed validation. This value determines whether the file from the KaxUpload control passed validation.

Examples
This example demonstrates how to implement validation for filenames.
private void KaxUpload1_ValidatingFile(object sender, ValidateFileEventArgs e)
{
    if (e.UploadedFile.GetExtension().ToLower() == ".zip")
    {
        //The zip files are not allowed for upload
        e.IsValid = false;
    }
}
See Also