开发者

Is it possible to create a desktop application whose UI is HTML rendered using ASP.NET templates without using a webserver?

I was thinking of creating a desktop application and for the user interface of the application I thought that HTML will be the best option. But I needed some way to generate the HTML for the application from the data structure that it holds.

So I wa开发者_如何学运维s wondering if it was possible to reuse the ASP.NET engine so it renders the pages but I don't want to install a full IIS server for the users of this application.

So is that possible? Maybe not using the ASP.NET engine, maybe there is a similar one for desktop applications.


You might be able to use the UltiDev Cassini web server (http://ultidev.com/products/Cassini/) for this purpose. Its lightweight and relatively easy to use.

Are you planning to generate the HTML dynamically, or will static HTML suffice? Don't forget that you can embed the IE WebBrowser control in a desktop app, and then gain access to the DOM from the desktop app code. Lots of interesting things could be done using this approach.


Have a look at this article "ASP. NET Client-side Hosting with Cassini":

http://msdn.microsoft.com/en-us/magazine/cc188791.aspx


I would recommend 2 options:

  1. Using c# to create a desktop app to host a Web Control. Use C# to process the data into html and feed that as a string to the webcontrol.
  2. Use jQuery to process your data in the HTML page itself.


Adobe AIR supports something like this (build a site using HTML+javascript, but then deploy it as a web application) however it is not going to support the ASP.NET markup.


Your question is about generating the HTML, not displaying the HTML, correct?

You can use the rendering engine from ASP.NET MVC, or even one of the alternate view engines like Spark.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜