Tab

UploadedFile.FileContent Property

Gets a stream object that points to the uploaded file.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

Declaration

public Stream FileContent { get; }
Public ReadOnly Property FileContent As Stream

Property Value

Type Description
Stream

A Stream object that points to the uploaded file.

Remarks

Uploading the file specified within the ASPxUploadControl can be initiated either by a call to the client ASPxClientUploadControl.Upload method, or automatically on the next round trip to the server (for instance, on a button click or page refresh). On the server side, while saving the uploaded file, the FileContent property can be used to access the file's contents.

IMPORTANT

To prevent the site performance degradation, it is required to release unmanaged resources after using the FileContent property. To do this, you can utilize the using statement or Dispose method.

using (Stream stream = e.UploadedFile.FileContent) {
     // do something with stream
}
See Also