在WinForms应用程序中编译ASPX [英] Compile ASPX in WinForms App

查看:162
本文介绍了在WinForms应用程序中编译ASPX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写一个发送电子邮件的WinForms应用程序(如邮件合并)。



我想使用ASP.Net的渲染引擎来渲染



在没有整个ASP.Net运行时,单个ASPX页面的渲染输出最简单的方式是什么?



为了使事情变得更加困难,我希望在运行时编译ASPX,以便在不重新构建应用程序的情况下进行修改。但是,这不是一个要求;如果这太难了,我会放弃它。

解决方案

Rick Strahl发表了一篇文章,如何在这个位置: http://www.west-wind.com/presentations/aspnetruntime/aspnetruntime .ASP 。我知道有一种方法可以调用一些内部的.NET Framework方法,但是我不记得他们在做什么。


I'm writing a WinForms application that sends email messages (like a mail merge).

I'd like to use ASP.Net's rendering engine to render the HTML bodies of the messages.

What's the simplest way to get the rendered output of a single ASPX page without the entire ASP.Net runtime?

To make things harder, I'd prefer to compile the ASPX at runtime so that it can be modified without rebuilding the application. However, this is not a requirement; if it's too difficult, I'll give up on it.

解决方案

Rick Strahl posted an article how to do this at this location: http://www.west-wind.com/presentations/aspnetruntime/aspnetruntime.asp. I know there is a way to call some internal .NET Framework methods but I can't remember what they are off hand.

这篇关于在WinForms应用程序中编译ASPX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆