asp.net.ph

Request.Files Property

System.Web Namespace   HttpRequest Class


Gets the collection of client-uploaded files ( Multipart MIME format ).

[ VB ]
Public ReadOnly Property Files As HttpFileCollection

[ C# ]
public HttpFileCollection Files {get;}

[ C++ ]
public: __property HttpFileCollection* get_Files ( );

[ JScript ]
public function get Files ( ) : HttpFileCollection;

Property Value

An HttpFileCollection object representing a collection of client-uploaded files.

Remarks

The file collection is populated only when the HTTP request Content-Type is multipart/form-data.

Example

The following example writes out the names of all files in the Files collection.

// load file collection into a string array
string [ ] myFiles = Request.Files.AllKeys;

// loop thru the array

for ( int i = 0; i < myFiles.Length; i++ ) {
   Response.Write ( "File: " + myFiles [ i ] + "<br>" );
}
  C# VB

See Also

HttpRequest Members   HttpFileCollection Class Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph