Accepting File Uploads
The FileUpload control enables users to upload files to your web application. After the file is uploaded, you can store the file anywhere you please. Normally, you store the file either on the file system or in a database. This section explores both options.
The FileUpload control supports the following properties (this is not a complete list):
• Enabled—
Enables you to disable the FileUpload control.
• FileBytes—
Enables you to get the uploaded file contents as a byte array.
• FileContent—
Enables you to get the uploaded file contents as a stream.
• FileName—
Enables you to get the name of the file uploaded.
• HasFile—
Returns True when a file has been uploaded.
• PostedFile—
Enables you to get the uploaded file wrapped ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access