Provides access to and organizes files uploaded by a client.

Namespace:  EasyAlgo.EAUpload
Assembly:  EasyAlgo.EAUpload (in EasyAlgo.EAUpload.dll)
Version: 1.3.0.0

Syntax

C#
public class UploadedFileCollection : NameObjectCollectionBase
Visual Basic (Declaration)
Public Class UploadedFileCollection _
	Inherits NameObjectCollectionBase

Remarks

Clients encode files and transmit them in the content body using multipart MIME format with an HTTP Content-Type header of multipart/form-data. EAUpload extracts the encoded file(s) from the content body into individual members of an UploadedFileCollection. Methods and properties of the UploadedFile class provide access to the contents and properties of each file.

You cannot create an instance of this class with the new keyword. EAUpload component creates object of this class automatically. You can obtain it by referencing the Upload..::.UploadedFiles property of an EasyAlgo.EAUpload..::.Upload object.

Examples

The following example demonstrates how to retrieve the UploadedFile object by the form field name.
CopyC#
// fileupload.aspx.cs
...
Upload _CurrentUpload = UploadsManager.GetUpload();
UploadedFileCollection _UploadedFiles = _CurrentUpload.UploadedFiles;

// Get a UploadedFile object by form field name
UploadedFile _File = _UploadedFiles["File1"];

string _FileName = _File.ClientFileName;
...    
____________________________

// fileupload.aspx
...
<form id="Form1" method="post" runat="server">
...
    <input type="file" name="File1" id="File1">
...
</form>
...
CopyVB.NET
' fileupload.aspx.vb
...
Dim _CurrentUpload As Upload = UploadsManager.GetUpload
Dim _UploadedFiles As UploadedFileCollection = _CurrentUpload.UploadedFiles

'Get a UploadedFile object by form field name
Dim _File As UploadedFile = _UploadedFiles("File1")

Dim _FileName As String = _File.ClientFileName
...    
____________________________

' fileupload.aspx
...
<form id="Form1" method="post" runat="server">
...
    <input type="file" name="File1" id="File1">
...
</form>
...

Inheritance Hierarchy

System..::.Object
  System.Collections.Specialized..::.NameObjectCollectionBase
    EasyAlgo.EAUpload..::.UploadedFileCollection

See Also