using System.Net;
WebClient req = new WebClient();
HttpResponse response = HttpContext.Current.Response;
response.Clear();
response.ClearContent();
response.ClearHeaders();
response.Buffer = true;
response.AddHeader("Content-Disposition", "attachment;filename=\"" + Server.MapPath(ConfigurationSettings.AppSettings["ResumePath"].ToString()) + hdnvalue.Value + "\"");
byte[] data = req.DownloadData(Server.MapPath(ConfigurationSettings.AppSettings["ResumePath"].ToString()) + hdnvalue.Value);
response.BinaryWrite(data);
response.End();
Where hdnvalue.Value contains the FileName and it comes from the database...
0 comments:
Post a Comment