asp.net.ph

HttpFileCollection Class

System.Web Namespace


Provides access to and organizes files uploaded by a client.

HttpFileCollection Class Members

Collapse   Properties

Visibility Name Value Type Accessibility
public AllKeys String [ Get ]
public Item ( String name ) HttpPostedFile [ Get ]
public Item ( Int32 index ) HttpPostedFile [ Get ]

Collapse   Methods

Visibility Name Parameters Return Type
public CopyTo ( Array dest , Int32 index ) Void
public Get ( Int32 index ) HttpPostedFile
public Get ( String name ) HttpPostedFile
public GetKey ( Int32 index ) String
public GetMultiple ( String name ) IList`1

Remarks

The properties and methods of the HttpFileCollection class are exposed via the Files property of the intrinsic Request object.

Clients encode files and transmit them in the content body using multipart MIME format with an HTTP Content-Type header of multipart/form-data. ASP.NET extracts the encoded file ( s ) from the content body into individual members of the Request.Files collection. The contents and properties of each file are then accessible via the HttpPostedFile class.

The HtmlInputFile control provides the means to select and upload files from a client.

Syntax


To call a method:

Request.Files.methodName ( arguments );
  C# VB

To return the value of a property or method:

Type var = Request.Files.propertyName;
Type var = Request.Files [ key ];
Type var = Request.Files.methodName ( arguments );
  C# VB

See Also

HttpPostedFile 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