StringWriter sw = new StringWriter();
Server.Execute("test/1.html", sw);Response.Write(sw.ToString());Response.Write(Common.Files.ReadFile("~/test/1.html"));web.config里面<globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" />
1.html编码也是utf-8为什么sw.ToString()是乱码,而readfile出来的又正常呢?
Server.Execute("test/1.html", sw);Response.Write(sw.ToString());Response.Write(Common.Files.ReadFile("~/test/1.html"));web.config里面<globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" />
1.html编码也是utf-8为什么sw.ToString()是乱码,而readfile出来的又正常呢?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货