Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><s>AFAIK you can not distribute Cassini with your apps. There are other desktop webserver, but non of them are 100% compatible with asp.net In my opinion, your solution will be too complicated to implement. </s></p> <h2>Edit</h2> <p>I learn <a href="https://stackoverflow.com/questions/916568/asp-net-mvc-render-page-to-a-file/918090#918090">from this post</a> that</p> <blockquote> <p>I personally like the StringTemplate option mentioned above, but you can actually host the ASP.NET runtime in a desktop application.</p> <p>Rick Strahl over at <a href="http://www.west-wind.com" rel="nofollow noreferrer">West Wind Technologies</a> has a detailed example of how to set it up: <a href="http://www.west-wind.com/presentations/aspnetruntime/aspnetruntime.asp" rel="nofollow noreferrer">Using the ASP.Net Runtime for extending desktop applications with dynamic HTML Scripts</a></p> <p>Here are a couple of other examples:</p> <ul> <li><a href="http://www.codeproject.com/KB/dotnet/usingaspruntime.aspx" rel="nofollow noreferrer">Code Project: Using ASP.NET Runtime in Desktop Applications</a></li> <li><a href="http://msdn.microsoft.com/en-us/magazine/cc188791.aspx" rel="nofollow noreferrer">MSDN Magazine: ASP. NET Client-side Hosting with Cassini</a> -- The nuts and bolts of how to use the ApplicationHost class.</li> <li><a href="http://andrewpeters.net/2008/11/19/in-process-aspnet-mvc-web-form-view-rendering/" rel="nofollow noreferrer">Andrew Peter's Blog: In-process ASP.NET MVC Web Form View Rendering</a></li> </ul> </blockquote> <h1>Other alternatives</h1> <h2>Alternative 1</h2> <p>One simple solution would be making simple replacements in the template HTML (using you own processor, and you will be ready to go.</p> <p>Something like this:</p> <pre><code>&lt;table&gt; &lt;tr&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;Phone&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th&gt;$Name&lt;/th&gt; &lt;!-- you should run a replace with $Name to the name --&gt; &lt;th&gt;$Phone&lt;/th&gt; &lt;/tr&gt; </code></pre> <h2>Alternative 2</h2> <p>Use a templating engine like <a href="http://stringtemplate.org/" rel="nofollow noreferrer">StringTemplate</a> (look for the C# implementation). <a href="http://www.codeproject.com/KB/codegen/DotNetCodeGeneration.aspx" rel="nofollow noreferrer">This CodeProject article</a> is a good intro to the subject </p> <h2>Alternative 3</h2> <p>If you want something more advanced (if your users can take it) I would investigate adding scripting to your app (IronPhyton, IronRuby)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload