//On the Application Layer (Windows Form) : private void GetFileFromArray() { try { // call web method and store the result byte[] GenItineraryResult = myService.CreateReport(); //returns created report as an byte array using (FileStream fs = new FileStream(@"c:\Report.pdf", FileMode.Create)) { fs.Write(GenItineraryResult, 0, GenItineraryResult.Length); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { fs.Close(); } }
OpenFileDialog ofd = new OpenFileDialog(); if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK) { var file = ofd.FileName; // Write your file using the filename provided }
SaveDialog
OpenDialog
FileMask
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)