• After more than 30 years running websites and forums I am retiring.

    I have made many friends through the years. I will cherish my time getting to know you. I wish you all the best. This was not an easy decision to make. The cost to keep the communities running has gotten to the point where it's just too expensive. Security certificates, hosting cost, software renewals and everything else has increased threefold. While costs are up ad revenue is down. It's no longer viable to keep things running.

    All sites will be turned off on Thursday 30 November 2023. If you are interested in acquiring any of the websites I own you can Email Schwarz Network.

PDF download and Save



I'm trying to download a PDF file then save it to a different server path programmatically. This code allows me to retrieve the pdf but I'm not sure how to save it once I get it.

Any help would be appreciated.


System.Net.WebClient client = new System.Net.WebClient();

byte[] download = client.DownloadData(Server.MapPath("~/PDF/2030.pdf"));
MemoryStream ms = new MemoryStream(download);

Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename= Form.pdf");
Response.Buffer = true;

Continue reading...
Top Bottom