I Want to save a PDF file from a byte array and want to save that file on my server map path location.
Below is my code snippet. It's giving no errors nor saving the file. You are welcome to correct my syntax if it is wrong or help me by referring other code snippets.
byte[] data = (byte[])listDataset.Tables[0].Rows[0][0];
System.IO.FileStream file = System.IO.File.Create(Server.MapPath(".\\TmpImages\\"+hfFileName+".pdf "));
file.Write(data, 0, data.Length);
file.Close();
File.WriteAllBytes: msdn.microsoft.com/en-us/library/…