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;

public partial class DownLoad : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string name = Request["load"];
        string path = @"D:\homework2_beta1\UpFile\" + name;
        System.IO.FileInfo file = new System.IO.FileInfo(path);
        Response.Clear();
        Response.AddHeader("Content-Disposition", "attachment;   filename=" + file.Name);
        Response.AddHeader("Content-Length", file.Length.ToString());
        Response.ContentType = "application/octet-stream";
        Response.WriteFile(file.FullName);
        Response.End();
        //Response.Redirect("~/Resource.aspx");
    }
}
