FormA facsimile of the ASP Request Form object. Like that interface, fields can be iterated by number, or by name. Multiple fields with the same name are collected into an array. This is the default property.
CountNumber of items in the Form collection.
lengthA synonym for Count.
Collect(MaxBytes)This method must be called to collect the form data; any
reference to the Request Form object before the Collect method is
called will consume the form data unsuccessfully. The MaxBytes parameter allows an upper limit on
the amount of upload data to accept (for security, performance, and
logistical reasons); a value of zero may be given to indicate no
limit (not recommended).
CStrW(bstr)Converts a byte-string to a string (used internally).
CStrB(str)Converts a string to a byte-string (used internally).
NameThe name of the form field.
ValueThe value of the form field (file contents, or value of the HTML input). This is the default property.
IsFileA boolean property that indicates whether this field contains a file.
FilenameThe name of the file uploaded (for file fields).
ContentTypeThe MIME type of the uploaded file (for file fields). Examples:
image/png or text/xml.
SizeThe size of the field or file, in bytes.
SaveTo(Path)A convenience method that uses the Scripting.FileSystemObject to
write the binary file data to the filename given. Relative paths
work as expected via the MapPath method
of the ASP Server object.
<html><head><title>Form Data</title></head><body><%SetFRequest=Server.CreateObject("ASP.FileForm")FRequest.Collect0' no size restrictionResponse.Write"Form data:<ol>"Fori=1ToFRequest.CountIfFRequest(i).IsFileThenResponse.Write"<li><b>"&FRequest(i).Name&"</b> <tt>"&FRequest(i).Filename_&"</tt> "&FRequest(i).ContentType&", "&FRequest(i).Size&" bytes</li>"FRequest(i).SaveTo"form"&i&".tmp"' relative path: save alongside this ASP fileElseResponse.Write"<li><b>"&FRequest(i).Name&"</b> "&FRequest(i).Value' ".Value" can usually be omittedEndIfNextResponse.Write"</ol><ul><li><b>title</b> "&FRequest("title") _&"</li><li><b>carimage</b> size: "&FRequest("carimage").Size&"</li></ul>"%></body></html>
Download ASPFileForm.wsc to web server (somewhere permanent, like a system directory).
Right-click the file and choose .