Html and Javascript not appending on page using ActionFilter

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
Hello everyone,

I'm upgrading plugin supporter version from nopCommerce 3.90 to nopCommerce 4.0.

I'm appending some javascript and Html content over page dome using ActionFilter.

As per supported nopCommerce 3.90, syntax for append data StringBuilder is as below

filterContext.HttpContext.Response.Write(stringBuilder.ToString()); 



But now in nopCommerce 4.0 (Asp.Net Core 2)
filterContext.HttpContext.Response.Write is now not available due to update references.

There one option available is WriteAsync, but it not working proper and it's remove all data from page.
This is my syntax

filterContext.HttpContext.Response.WriteAsync(stringBuilder.ToString());



Let me know if there is any mistake or another solution for append data on page using ActionFilter.

Thanks in advance
6 years ago
Check my answer on stackoverflow.
Consider there may be much better solutions.
6 years ago
Raphael.Strotz wrote:
Check my answer on stackoverflow.
Consider there may be much better solutions.


Hello Raphael,

Thanks for your help. It's working fine with nopCommerce 4.0.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.