FileUpload::FileContent Property
Gets a Stream object that points to a file to upload using the FileUpload control.
Assembly: System.Web (in System.Web.dll)
Property Value
Type: System.IO::Stream^A Stream that points to a file to upload using the FileUpload.
The FileContent property gets a Stream object that points to a file to upload by using the FileUpload control. Use the FileContent property to access the contents of the file. For example, you can use the Stream object that is returned by this property to read the contents of the file as bytes and store them in a byte array.
The following example demonstrates how to create a FileUpload control. The FileContent property is used to read the contents of the file into a byte array. When the user clicks the Upload file button, the contents of the file are displayed as bytes in a text box on the page.
Available since 2.0