using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace SWFFileUpload.WetTest
{
    public partial class CustomerHandler : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Page.Request.Files.Count > 0)
            {
                string tempFile = this.Page.Request.PhysicalApplicationPath;
           
                for (int j = 0; j < this.Page.Request.Files.Count; j++)
                {

                    HttpPostedFile uploadFile = this.Page.Request.Files[j];

                    if (uploadFile.ContentLength > 0)
                    {
                        uploadFile.SaveAs(string.Format("{0}{1}{2}", tempFile, "UploadFiles\\", uploadFile.FileName));
                    }
                }
            }
           // HttpContext.Current.Response.Write(" ");
        }
    }
}
