记录点滴技术
网站已经设置utf-8作为全局编码,某个页面的后台需要采用gb2312输出中文,发现用Response.ContentType = "text/html;charset=GB2312"没效果,输出是一堆乱码。
需要这样才行:
Response.ContentEncoding = Encoding.GetEncoding("GB2312");