You could use the HTML File field control but you don't necessarily have to -
you DO need to make sure the <FORM> elements enctype attribute is set to
"multipart/form-data" see html below:
HTML:
<form id="Form1" method="post" runat="server" enctype="multipart/form-data">
<INPUT type="file">
<INPUT type="submit" value="Post file">
</form>
CODE-BEHIND:
private void Page_Load(object sender, System.EventArgs e)
{
if (this.IsPostBack)
{
if (this.Request.Files.Count > 0)
{
HttpPostedFile postedFile = this.Request.Files[0];
postedFile.SaveAs(Server.MapPath("."),
System.IO.Path.GetFileName(postedFile.FileName)));
}
}
}