File Directory ASP.Net

<%@ Page Language="vb" %>

   
      Unload event example
      
         Dim TheFile As System.IO.StreamReader
         Sub Page_Load()
            TheFile = System.IO.File.OpenText(MapPath("file.txt"))
            Message.Text = "
" & _
               Server.HtmlEncode(TheFile.ReadToEnd()) & "
"
         End Sub
         Sub Page_Unload()
            TheFile.Close()
         End Sub