在使用JS+DOM,实现手工AJAX中,url传递中文乱码,
js中escape(escape(name))
服务器端,接收受用Decode解码。
public static string Encode(string strValue)
{
return HttpUtility.UrlEncode(strValue, Encoding.GetEncoding("UTF-8"));
}
public static string Decode(string strValue)
{
return HttpUtility.UrlDecode(strValue, Encoding.GetEncoding("UTF-8"));
}
coolly
专注于企业信息化
技术领域:MOSS,ASP.net,SQLServer
目前行业:房地产,重庆商用物业
Email:1001tao@gmail.com
Blog:www.cnblogs.com/1001tao