I am trying to output my console application to a webpage, the console application generates a set of double/decimal and string arrays which are displayed. Can anybody help me output it to a html file please.
This is the code I have so far:
if (!File.Exists("Test.html"))
{
StreamWriter stream = new StreamWriter("Test.html", true, System.Text.Encoding.UTF8);
stream.Write(@"<html>" + stream.NewLine + @"<body>" + stream.NewLine);
stream.Write(@"<table width='100%' cellpadding='10' style='margin-top:10px' cellspacing='3' border='1' rules='all'>
<tr>
<td>
<h3>
<span style='font-family:Verdana'>"+stock1+" My Test Is here</span>
</td>
</tr>
</table>" + stream.NewLine + "</body>" + stream.NewLine + "</html>");
stream.Flush();
stream.Close();
}
System.Diagnostics.Process.Start(@"Test.html");
I am not really sure how this snippet of code works but before adding "+stock1+" it outputted the text 'My Test Is Here'. Thank you in advance.