Skip to main content

Posts

Showing posts with the label Read a file

C#, Read a file

C#, Code to read a file  String strHtmlMessage = String .Empty; String strFilePath = HttpContext.Current.Server.MapPath("~/Mails/Confirmationmaill.htm");   using (StreamReader sr = new StreamReader(strFilePath))   {     strHtmlMessage = sr.ReadToEnd();  }