pdfDoc.Add(pdfTable); pdfDoc.Close(); string newfile = Name + "_" + DateTime.Now.ToString("dd-MMM-yyyy") + ".pdf"; String path_name = "~/Sample/SampleReports/"; var pdfPath = Path.Combine(Server.MapPath(path_name)); string username = "Test"; string password = "12345"; //String file_name_pdf = "Test.pdf"; var pdfContents = mStream.ToArray(); File.WriteAllBytes(Path.Combine(pdfPath, newfile), pdfContents); WebRequest request = WebRequest.Create(Server.MapPath("~/Sample/SampleReports/" + pdfContents)); request.Method = WebRequestMethods.Ftp.UploadFile; request.Credentials = new NetworkCredential(username, password); Stream reqStream = request.GetRequestStream(); reqStream.Close();
WebRequest request = WebRequest.Create(Server.MapPath("~/Sample/SampleReports/" + pdfContents));
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)