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

Tags: , ,

Leave a Reply