PowerWEB File Upload for ASP.NET
FileExistsBehavior Property
See Also  Send comments on this topic.
Dart.FileUpload Namespace > UploadManager Class : FileExistsBehavior Property



Behavior when encountering duplicate files in the Save Path.\r\nOverwrite - if possible, replace the existing file with the one being uploaded\r\nRename - Rename the new file according to the FileRenamePattern\r\nFail - Throw an exception when encountering an existing file, and immediately stop the upload in progress.

Syntax

Visual Basic (Declaration) 
<DartDescriptionAttribute("Behavior when encountering duplicate files in the Save Path.
Overwrite - if possible, replace the existing file with the one being uploaded
Rename - Rename the new file according to the FileRenamePattern
Fail - Throw an exception when encountering an existing file, and immediately stop the upload in progress")>
<DefaultValueAttribute()>
Public Property FileExistsBehavior As FileExistsBehavior
Visual Basic (Usage)Copy Code
Dim instance As UploadManager
Dim value As FileExistsBehavior
 
instance.FileExistsBehavior = value
 
value = instance.FileExistsBehavior
C# 
[DartDescriptionAttribute("Behavior when encountering duplicate files in the Save Path.
Overwrite - if possible, replace the existing file with the one being uploaded
Rename - Rename the new file according to the FileRenamePattern
Fail - Throw an exception when encountering an existing file, and immediately stop the upload in progress")]
[DefaultValueAttribute()]
public FileExistsBehavior FileExistsBehavior {get; set;}
C++/CLI 
[DartDescriptionAttribute("Behavior when encountering duplicate files in the Save Path.
Overwrite - if possible, replace the existing file with the one being uploaded
Rename - Rename the new file according to the FileRenamePattern
Fail - Throw an exception when encountering an existing file, and immediately stop the upload in progress")]
[DefaultValueAttribute()]
public:
property FileExistsBehavior FileExistsBehavior {
   FileExistsBehavior get();
   void set (    FileExistsBehavior value);
}

Property Value

The default value is Rename.

Remarks

Though you may set the value to Overwrite, if a file is locked or in use, an exception will be raised if the UploadManager attempts to overwrite it.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 4.0.3
© 2012 Dart Communications. All Rights Reserved.