asp.net.ph

HttpPostedFile Class

System.Web Namespace


Provides a way to access individual files that have been uploaded by a client.

HttpPostedFile Class Members

Collapse   Properties

Visibility Name Value Type Accessibility
public ContentLength Int32 [ Get ]
public ContentType String [ Get ]
public FileName String [ Get ]
public InputStream Stream [ Get ]

Collapse   Methods

Visibility Name Parameters Return Type
public SaveAs ( String filename ) Void

Remarks

The members of the HttpPostedFile class are exposed via the PostedFile property of the HtmlInputFile control, which provides the means to select and upload files from a client.

The HttpFileCollection class provides access to all the files uploaded from a client as a file collection. HttpPostedFile provides the means to access the content and properties of each individual file, and to read and save the file. Files are uploaded in MIME multipart/form-data format and are buffered in server memory until explicitly saved to disk.

 Show me 

Syntax


To call a method:

HtmlInputFile.PostedFile.methodName ( arguments );
  C# VB

To return the value of a property:

Type var = HtmlInputFile.PostedFile.propertyName;
  C# VB

See Also

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