URL 编码

HttpUtility.UrlDecode 解码会把+号变成空格 Server.UrlDecode 解码会把+号变成空格所以说在我接收到参数后对参数进行了替换Request.QueryString["keyword"].Replace("+", "%2b")。

HttpUtility.UrlDecode写法

HttpUtility.UrlDecode(Request.QueryString["keyword"].Replace("+", "%2b"), System.Text.Encoding.UTF8)

Server.UrlDecode(Request.QueryString["keyword"].Replace("+", "%2b"))默认编码

posted on 2010-09-06 09:40  freexiaoyu  阅读(343)  评论(0编辑  收藏  举报