I am creating a WPF application (in C #) that will create html files based on its output. Is there a way to use the html 'view' concept (from asp.net mvc) in a desktop application without having to reinvent the wheel? Basically, I just want to keep the list of released elements in html, which is so simple in a web application (and even uses binding in a working wpf application to display output in a window), but it seems awkward for HTML output in a desktop application, which I feel like I would invent a wheel to enable flexible html templates with my data output program.
Of course, is there a quick and elegant way to do this? Thank!!
EDIT:
As an example, let's say that the output of the program was a list of names (Bill, Bob, Jill, Frank), I would like to save the following HTML file to disk:
<html>
<body>
<ul>
<li>Bill</li>
<li>Bob</li>
<li>Jill</li>
<li>Frank</li>
</ul>
</body>
</html>
if the user has defined an html template, for example:
<html>
<body>
<ul>
<li></li>
</ul>
</body>
</html>
which could be done in ASP.NET MVC (or in a very similar way in PHP, ruby, etc.) if the user defined something similar to the following:
<html>
<body>
<ul>
<% foreach (string name in NameList) { %>
<li>
<%: name %>
</li>
<% } %>
</ul>
</body>
</html>
and I would like to know if there is an easy way to create html files using this method in a desktop application? Thanks again everyone!
source
share