asp.net返回值当文件下载问题

mvc中返回的javascript当做文件下载

 解决方案

  Response.ContentEncoding = System.Text.Encoding.UTF8;

  Response.ContentType = "text/html";

或者使用

  Page.ClientScript.RegisterClientScriptBlock  (上面两句话就不用写了)

原文地址:https://www.cnblogs.com/anbylau2130/p/3522833.html