string path= "aa.pdf"; //Or URL 
            System.Net.WebClient w = new WebClient();
            byte[] f= w.DownloadData(path);
    //保存到数据varbinary字段类型中

 

            //取出后

            Response.AddHeader("Content-Disposition", "attachment;filename=d.pdf"); 
            Response.ContentType = "Application/pdf";
            Response.BinaryWrite(f);
posted on 2011-10-11 18:03  visi  阅读(274)  评论(0编辑  收藏  举报