日期:2014-05-19  浏览次数:20885 次

有这么个问题郁闷了!~~高手来帮帮忙!~~
由于设计,还有客户要求,环境等各种原因吧,
现在这页面被做成这样的。。
asp页面上什么都没有,用*.asp.cs后台程序,直接向外发html,由客户端生成页面。
就是使用this.page.response.write(),直接往外写html。

那现在有这样一个问题,就是编码。
我在this.page.response.write()   写出之前,定义this.page.response.ContentEncoding   定义为   gb2312。
然后   在页面启动前,就定义,this.page.request.ContentEncoding   也为   gb2312
可为什么接受画面返回的文本框的值仍然不是中文呢?

要是不明白,我可以给个具体例子!

------解决方案--------------------
strBuilder.AppendLine( " <html> <body> ");
这句话改成
strBuilder.AppendLine( " <html> <HEAD> <meta http-equiv=\ "Content-Type\ " content=\ "text/html; charset=gb2312\ "> </HEAD> <body> ");