.NET-Core中 HttpContext.Response.Write() 中文输出乱码

context.Response.ContentType = "text/plain; charset=utf-8";-------此方法只能输出文本

 Response.WriteAsync("<script>alert('添加品牌成功!');location.href='/ProductInfos/ShowProduct';</script>", Encoding.GetEncoding("GB2312"));

猜你喜欢

转载自www.cnblogs.com/Kirins/p/10412004.html
今日推荐