Mega Code Archive
Accepting File Uploads
Important properties, events
Enabled: disable the FileUpload control.
FileBytes: get the uploaded file as a byte array.
FileContent: get the uploaded file as a stream.
FileName: get the name of the file uploaded.
HasFile: Returns True when a file has been uploaded.
PostedFile: get the uploaded file wrapped in the HttpPostedFile object.
Focus: set the form focus to the FileUpload control.
SaveAs: save the uploaded file to the file system.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.IO" %>
FileUpload File