RSS

Reading an html file

Tue, Aug 12, 2008

ASP.NET, Code

This is how to read an html file, it could be used for text files too. The extension doesn’t seem to matter.

Sub readFile()
        Dim rdr As StreamReader = New StreamReader(Server.MapPath("test.htm"))
        Me.textAreaControl.InnerText = rdr.ReadToEnd
End Sub
Share and Enjoy:
  • Facebook
  • Twitter
  • MySpace
  • Digg
  • del.icio.us
  • Google Bookmarks
  • Yahoo! Buzz
, ,

Comments are closed.