I have a C# application where I'd like to present information that is accumulated in memory from an embedded system in the form of an HTML page in a near real-time manner. As a proof of concept I've implemented an HttpListener
within the application and that works well for serving the data but at the moment for testing I've hard-coded a simple HTML table within the code.
What I'd like to do instead is serve the content based on merging the data with an HTML template that can be modified by the end user. To give an example the columns would be something fairly simple such as the following:
Race: 1
Position Rider Horse Time
1 Jon Skeet Fast runner 1:20:10
2 Joe Bloggs Not so fast 1:25:20
...
10 PeterJ Bit slow 2:30:01
I could come up with my own scheme such as the following:
<h1>Race: {f:RaceNum}</h1>
{MaxRows=10}
<table>
<tr><td>{r:Position}</td><td>{r:Rider}</td><td>{r:Horse}</td><td>{r:Time}</td></tr>
</table>
Which would work fine but it struck me maybe I'm re-inventing the wheel and there is a more standard and extensible way to approach it?