asp.net.ph

HtmlInputFile.PostedFile Property

System.Web.UI.HtmlControls Namespace   HtmlInputFile Class


Provides access to the uploaded file specified by a client.

Syntax


Script HtmlInputFile.PostedFile. [ propertyname | methodName ]

This property can only be used programmatically; it cannot be set when declaring the control.

Property Value

A System.Web.HttpPostedFile object that represents the file to be uploaded.

Remarks

Browser security restrictions prevent this value from being maintained across multiple requests.

Example

The below code shows a simple way to use the PostedFile property to check if the user has uploaded a file.

if ( myFileUploader.PostedFile != null ) {

   ... get its properties, save the file, do whatever here

}
  C# VB

See Also

HtmlInputFile Members   HttpPostedFile 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