With ASP.NET 2.0 release, file upload process became quite simple and there is no need to use third-party components anymore. There is a built-in server control called FileUpload and you are welcome to use it on our servers.

Here is a code sample:

<%@ Page Language="C#" %>

<script runat="server">
    protected void Button1_Click(object sender, EventArgs e)
        if (FileUpload1.HasFile)
                FileUpload1.SaveAs("D:\\home\\Username\\Htdocs\\Uploads\\" +
                Label1.Text = "File name: " +
                     FileUpload1.PostedFile.FileName + "<br>" +
                     FileUpload1.PostedFile.ContentLength + " kb<br>" +
                     "Content type: " +
            catch (Exception ex)
                Label1.Text = "ERROR: " + ex.Message.ToString();
            Label1.Text = "You have not specified a file.";

<html  >
<head runat="server">
    <title>Upload Files</title>
    <form id="form1" runat="server">
        <asp:FileUpload ID="FileUpload1" runat="server" /><br />
        <br />
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
         Text="Upload File" />&nbsp;<br />
        <br />
        <asp:Label ID="Label1" runat="server"></asp:Label></div>

    Windows 2008 users:
1) The destination path for uploaded files has to look like "D:\\home\\Username\\Htdocs\\Uploads\\"
2) Application pool user needs to be given Full Control access to that folder ("Managing access permissions for a Windows 2008\IIS7 site").

    Windows 2003 users:
1) The destination path for uploaded files has to look like "D:\\ftp\\Username\\Htdocs\\Uploads\\"
2) Anonymous user needs to be given Change access to that folder (please submit "Write Access for Anonymous User" extended service request for that, "How to use the Extended Services portal").

For more information, please refer to the MSDN site: