Asp.net源码坊

ajax与.net交互中文乱码解决办法

客户端:

以"get"方式进行表单提交,在需要传递中文的地方用函数escape("")将字符转码。

 

后台服务器

 

C#代码

#region 解码中文汉字

publicstring getGBKChinese(string encodeStr)

{

return System.Web.HttpUtility.UrlDecode(encodeStr);

}

#endregion  

C#后台源码:Microsoft.JScript.GlobalObject.escape

posted @ 2014-04-06 14:34  liubo175175  阅读(256)  评论(0)    收藏  举报
Asp.net源码坊