Can I run a ASPX and grep the result without making HTTP request?

前端 未结 2 581
粉色の甜心
粉色の甜心 2021-01-03 08:06

How can I just make a function call, without URL, and without HTTP, to a simple ASP.NET file, and capture the byte stream it generated?

More background information,

2条回答
  •  孤街浪徒
    2021-01-03 08:46

    This sounds like a very similar issue which is generating HTML emails on a server. There are some answers here that do that (for MVC):

    ASP.NET MVC: How to send an html email using a controller?

    You can proceed in a similar fashion for non-MVC by loading and rendering a control (ASCX) to a file.

提交回复
热议问题