To Examples
show-poem.aspx Source Code
<!-- show-poem.aspx Example Display The Raven, poem by Edgar Allen Poe. --> <%@ Page Language="C#" %> <script runat=server> public string output; public void Page_Load(object sender, EventArgs e) { System.IO.StreamReader sr; sr = new System.IO.StreamReader( e:\\ectserver\\sjost\\Database\\raven.txt); string line; output = ; while (sr.Peek( ) > -1) { line sr.ReadLine( ); output += line + <br />; } } </script> <html> <head> <title>show-poem.aspx Example</title> <style> body { background-color: #909090; color: #600000; } h2,h3 { font-family: Forte; } h2 { font-size: 200%; } h3 { font-size: 160%; } p { font-family: Papyrus; } </style> </head> <body> <h2>show-poem.aspx Example</h2> <h3>Display poem obtained from text file.</h3> <form id=frmShowPoem runat=server> <p><%=output%></p> </form> </body> </html>