private void ReadFile() { string path; path = Server.MapPath("~/Temp_Image/"); string docName = "Truevalue.txt"; // string docPath = @"C:\sample\"; string docPath = path; printDocument1.DocumentName = docName; using (FileStream stream = new FileStream(docPath + docName, FileMode.Open)) using (StreamReader reader = new StreamReader(stream)) { stringToPrint = reader.ReadToEnd(); } printDocument1.Print(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)