Click or drag to resize
KaxUploadValidatingFile Event
Occurs before the internal validation of every file in the UploadedFiles collection.

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
public event ValidateFileEventHandler ValidatingFile


Type: Kettic.AspNet.Controls.UploadValidateFileEventHandler

To skip the internal validation of the file, set e.SkipInternalValidation = true.

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