相关疑难解决方法(0)

在Asp.Net Core 2中是否有等效于“ HttpContext.Response.Write”的文件?

我正在尝试使用Asp.Net Core 2中的ActionFilter在页面上附加一些HTML和Javascript内容。

在MVC中,它与

 filterContext.HttpContext.Response.Write(stringBuilder.ToString());
Run Code Online (Sandbox Code Playgroud)

但是在Core中它不起作用。

我试图用这个实现:

filterContext.HttpContext.Response.WriteAsync(stringBuilder.ToString());
Run Code Online (Sandbox Code Playgroud)

但这会使整个页面空白。

我正在寻找内置在Asp.Core 2.0中的nopCommerce 4.0的解决方案

httpcontext nopcommerce asp.net-core-2.0 nopcommerce-4.0

5
推荐指数
3
解决办法
7055
查看次数