<%@ Page Language="VB" %>
<%@ Import namespace="System.IO" %>
<script runat="server">
sub DisplayFile(Sender as Object, e as EventArgs)
dim strFile as string = tbFile.Text
dim objReader as StreamReader
if File.Exists(strFile) then
objReader = new StreamReader(strFile)
while objReader.Peek > -1
lblMessage.Text += Server.HTMLEncode _
(objReader.ReadLine) & "<br>"
end while
objReader.Close
end if
end sub
</script>
<html><body>
<form runat="server">
<asp:TextBox id="tbFile" runat="server"
OnTextChanged="DisplayFile"
AutoPostBack=true />
<asp:Label id="lblMessage" runat="server"
MaintainState=false/>
</form>
</body></html>