Click or drag to resize
KaxUploadFileExists Event
Occurs after an unsuccessful attempt for automatic saving of a 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)
Syntax
public event UploadedFileEventHandler FileExists

Value

Type: Kettic.AspNet.Controls.UploadUploadedFileEventHandler
Remarks

This event should be consumed only when the automatic file saving is enabled by setting the TargetFolder property. In this mode the files are saved in the selected folder with the same name as on the client computer. If a file with such name already exists in the TargetFolder it is either overwritten or skipped depending the value of the OverwriteExistingFiles property. This event is fired if OverwriteExistingFiles is set to false and a file with the same name already exists in the TargetFolder.

Examples
This example demostrates how to create custom logic for renaming and saving the existing uploaded files.
private void KaxUpload1_FileExists(object sender, Kettic.AspNetControls.UploadedFileEventArgs e)
{
    Kettic.AspNetControls.UploadedFile TheFile = e.UploadedFile;

    TheFile.SaveAs(Path.Combine(KaxUpload1.TargetFolder, TheFile.GetNameWithoutExtension() + "1" + TheFile.GetExtension()), true);
}
See Also