System.Web.UI.WebControls.FileUpload.PostedFile Property

Gets the underlying System.Web.HttpPostedFile object for a file that is uploaded by using the System.Web.UI.WebControls.FileUpload control.

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.Browsable(false)]
public System.Web.HttpPostedFile PostedFile { get; }

Value

Documentation for this section has not yet been entered.

Remarks

The FileUpload.PostedFile property gets the underlying System.Web.HttpPostedFile object for a file that is uploaded by using the System.Web.UI.WebControls.FileUpload control. Use this property to access additional properties on the uploaded file.

You can use the System.Web.HttpPostedFile.ContentLength property to get the length of the file. You can use the System.Web.HttpPostedFile.ContentType property to get the MIME content type of the file. In addition, you can use the FileUpload.PostedFile property to access the System.Web.HttpPostedFile.FileName property, the System.Web.HttpPostedFile.InputStream property, and the System.Web.HttpPostedFile.SaveAs(string) method. However, the same functionality is provided by the FileUpload.FileName property, the FileUpload.FileContent property, and the FileUpload.SaveAs(string) method.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0