public void download(string url)
{
FileInfo fi = new FileInfo(url);
if (fi.Exists)
{
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment;filename=" +
Context.Server.UrlPathEncode(fi.Name));//防止输出乱码
Response.AddHeader("Content-Length", fi.Length.ToString());
Response.Filter.Close();
Response.WriteFile(fi.FullName);
Response.End();
}
else
{
}
}