0

我正在运行可执行应用程序(WinForms一个),并且我需要渲染几个 HTML 页面(一种“活动” - 它使用模型并生成整个页面的 HTML 代码)。

我正在寻找引用 MVC 或 ASP.NET 项目。使用这些(或者可能是其他工具;如果是,它们是什么?)项目从模型渲染原始 HTML 代码的最佳方式是什么View Page

4

2 回答 2

2

See the following SO question about hosting ASP.Net in WinForms projects - its entirely doable!

Hosting ASP.NET within my application

In reply to AgentFires comment about doing it without a http host involved (which Im assuming he means a web server), try these two articles from Rick Strahl about hosting the ASP.Net runtime directly.

http://www.west-wind.com/presentations/aspnetruntime/aspnetruntime.asp

http://www.west-wind.com/weblog/posts/2005/Jul/20/AspNET-Runtime-Hosting-Update

They are fairly old, but they should get you started.

于 2012-07-16T08:39:58.583 回答
0

如果您得到一个 html 字符串,那么您可以将该 html 代码注入到浏览器控件中

于 2012-07-16T08:37:39.850 回答