Asp.Net Upload
Version 1.2.1  how it workHelp and tutorialsAdd to cart
How does it work - Upload Files
Insert
Update
Upload
Delete
Price: 34,00 €
Usd. 45,09
Currency conversion according with PayPal
 
 
 
It is possible build form pages that include file upload fields that are not required.
There is no need for any other components or special access to the server!
An Upload report is send to the redirect page.
   
Upload report

The redirect page receive, in the post, this field for each file uploaded:
- FileName
- FileLength
- FileStatus
- NewFileName
To separate the single file value (for multiple upload file) to each variable I add a progressive number.
FileStatus value:
0 No problem Saved
1 File size exceed Skipped
2 File extension not allowed Skipped
3 File extension not allowed and File size exceed Skipped
4 File exist Skipped

The NewFileName variable can be "0" (If my code don't modify the file name) or "-1" (If my code modify the file name this option is applied if You use the "Unique name" in the Conflict Handling options)
An optional field is send to the redirect page: "NumFile" that is the number of file Uploaded
To see an example of the redirect page click this link
If you set the Total file size value and the sum of the size of the uploaded files exceed the files will not be saved and 2 parameters will be send to the redirect page in the post parameters.
The 2 parameters are:
UploadedSize: The sum of the size of all the uploaded files
MaxFileSize: The max size allowed for the upload (The value of the field Total file size)

   
On Success, go to In the On Success, Go To text box, enter the location of a page to display after the server behavior runs successfully or click the Browse button to browse to the location.
   
On Failure, go to In the On Failure, Go To text box, enter the location of a page to display if the server behavior fails or click the Browse button to browse to the location.
   
Display debugging Select the Display Debugging Information on Failure checkbox if you want debugging information when the server behavior fails.
When you select this option, Dreamweaver ignores the On Failure, Go To option.
Tip: Use the debugging option during development and use the On Failure, Go To option when your site is live.
   
Files Fields The list of the File Field in Your form.
No Limit Number of Uploaded file!
Click on the file name to see/modify/insert the features applied to it.
   
Script TimeOut The Server.ScriptTimeout of Your ASP page.
   
Progress Bar You can select the Progress Bar to display during the Upload
See the different type of Progress Bar Available.
IMPORTANT: Be sure to upload all the new files and also the web.config that is modified and is indispensable for the progress bar to work.
   
Temp folder The upload page write the parameters for the upload progress-bar in a text file and normally I use the system temp folder to save this text file, but if you don't have access to the system temp folder (for example in a shared server) you can set a different temp folder.
In this field you can insert the path of the temp folder you want use.
This path must be an absolute path like: c:\tempfolder\ and in this folder you must have write permission for the AspNet user, for more info read in my FAQ.
   
Total file size File upload size can be limited for each file or for the sum of all the uploaded files.
This field is the file size limit for the sum of the uploaded files.
It can be limited on the server side (after upload)
If this field is void no limit size are applied.
   
Remove Char

In checked replace special characters from the files name with "_"
Only letters, numbers and _- are allowed.

All this features are for each file!!!
Upload Folder The Folder to save the uploaded file.
The non-existent folders from the path are auto-created!
You can define it with 2 method:
Site Relative: a Path relative to the Site or to the Document
ex: /MyFolder/
ex: //MyFolder
Use the search button to find Your Upload Folder
Absolute:

an Absolute Path
ex: c:\MyFolder\
With this You can save the file outside Your web site. Simply write the full path on the server as your upload folder!

   
File Name

The name of the file uploaded.
Set this value only if you want modify the name of the uploaded file.
Don't insert the extension of the file, my code get the extension from the uploaded file

   
Allowed Extension You can select which file extensions you want to allow your users to upload.
If this field is void no restriction are applied.
It can be limited on the server side (after upload) and on the client side (before upload).
To select which file extension you want to allow you must enter the list of extension/s separated by comma.
ex: txt,doc,pdf
   
Max File Size File upload size can be limited for each file or for the sum of all the uploaded files.
This field is the file size limit foreach uploaded files.
It can be limited on the server side (after upload) and on the client side (before upload).
The file that exceed the size are skipped
If this field is void no limit size are applied
   
Max Dim If Image

The pixel Image dimensions can be limeted!
It can be limited on the client side (before upload).
If one of them exceed the dimension the Upload don't start.
Tha value are in Pixels.
You can limit only Width, only Height or the two dimension.
If this field/s is/are void no limit are applied.
The test if image is on the file extension's.

   
Conflict Handling

Should a file already exist on the server, you can specify how you would like to handle the new file. Choices include overwriting, giving the file a unique name and skipping the file.
If You select "Unique name" and a file exist my code add e progressive number to the file name
.
ex: Existing file is MyFile.txt the new name will be MyFile0.txt

   
Copy Value Button You can set this option for each file. So if You upload more files You can have different option value for each uploaded files. But if You have more files and the same option you can enter the option value for the first file and click on the copy button to copy the same value for all the other files.
The copy button is not allowed if the first file is selected.