using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        String  savePath = "f:\\asp2008progs\\ch18\\ch18-2\\";
        if(Uploader .HasFile)
        {
            string fileName = Uploader .FileName;
            savePath += fileName;
            Uploader.PostedFile.SaveAs(savePath);
            Label1.Text = "Your file saved as " + fileName ;
        }
        else
            Label1 .Text = "You did not specify a file name to upload";

    }
}
