Saves an uploaded file to the specified location. Overwriting a file of the same name is not allowed.
Namespace:
EasyAlgo.EAUploadAssembly: EasyAlgo.EAUpload (in EasyAlgo.EAUpload.dll)
Version: 1.3.0.0
Syntax
| C# |
|---|
public void SaveAs( string path ) |
| Visual Basic (Declaration) |
|---|
Public Sub SaveAs ( _ path As String _ ) |
Parameters
- path
- Type: System..::.String
The path to save an uploaded file.
Remarks
This method is equivalent to the SaveAs(String, Boolean) method overload with the overwrite parameter set to false.
The path argument is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the application working directory (see also HttpRequest..::.PhysicalApplicationPath).
The path argument is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the application working directory (see also HttpRequest..::.PhysicalApplicationPath).
Exceptions
| Exception | Condition |
|---|---|
| System..::.ArgumentNullException | Thrown when the specified path is nullNothingnullptra null reference (Nothing in Visual Basic). |
| EasyAlgo.EAUpload..::.EAUploadException | Thrown if the destination file already exists. |
| System..::.UnauthorizedAccessException | Thrown if ASP.NET process does not have write permissions to the specified path |
