FormFiles Collection

The FormFiles collection contains FormFile objects used to store files selected in HTML-form.

The FormFile objects are retrieved by the Uploader.ParseRequest method.

Syntax

FormElements.property

 

Properties
Count Returns the number of FormFile objects in the collection.
Item Returns a reference to an element of the collection.

 

Remarks

Item is the default property of the collection, so FormFiles.Item(index) and FormFiles(index) are equivalents.

To iterate through the collection, you can use either For .. Each statement or any common loop statement such as For .. To.

 

Example

The following examples use different syntax to display names of all files selected in a HTML-form. It's assumed the FormFiles collection has been already retrieved and stored in objFormFiles object.


For .. Each syntax
For Each objFormFile In objFormFiles
  Response.Write objFormFile.Name
Next

 

For .. To syntax
For I = 1 To objFormFiles.Count
  Response.Write objFormFile.Name
Next

 

See Also

FormElements Collection | FormElement Object | Uploader Object

 


Send feedback to AfterLogic
Copyright © 2002-2022, AfterLogic Corporation. All rights reserved.