How to read HTML file onServer in ASP.Net

Private Function GetEmailTemplate(ByVal templateName As String) As String
Dim sr As IO.StreamReader = New IO.StreamReader(System.Web.HttpContext.Current.Server.MapPath(templateName))
Dim body As String = sr.ReadToEnd()
sr.Close()
sr.Dispose()
Return body
End Function

Related posts:

  1. Read a Web Page and send it as an HTML Email
  2. Read all Mail Merge Field in an Collection.
  3. How to Use Code Behind to display text on Binding
Leave A Comment