Click or drag to resize
ValidateFileEventArgsSkipInternalValidation Property
Gets or sets whether the internal validation should continue validating the file specified by the UploadedFile property.

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 SkipInternalValidation { get; set; }

Property Value

Type: Boolean
false to indicate that the internal validation should validate the file specified by the UploadedFile property; otherwise, true
Remarks
Once your validation routine finishes, use the SkipInternalValidation property to skip the internal validation provided by the KaxUpload control.
Examples
This example demostrates how to implement custom validation for specific file type.
private void KaxUpload1_ValidatingFile(object sender, ValidateFileEventArgs e)
{
    if (e.UploadedFile.GetExtension().ToLower() == ".zip")
    {
        int maxZipFileSize = 10000000; //~10MB
        if (e.UploadedFile.ContentLength > maxZipFileSize)
        {
            e.IsValid = false;
        }
        //The zip files are not validated for file size, extension and content type
        e.SkipInternalValidation = true;
    }
}
See Also