【发布时间】:2014-03-04 05:18:59
【问题描述】:
我使用 encodeURIComponent 并在查询字符串中发送它,但是当我在 asp.net 页面中得到它时,它发生了变化。这是代码。
var postType = encodeURIComponent($(obj).parents(".post").attr("data-item-type"));
var postId = encodeURIComponent($(obj).parents(".post").attr("data-item"));
window.location.href = "PostDetail.aspx?" + GetGUID() + '&pId=' + postId + '&pType=' + postType;
在asp页面中
在网址中显示正确的“rEpJZ8IDRfIbFpptDl%2B84w%3D%3D&pType=ereq47B7tt0BQMO5nRRbOQ%3D%3D”
但在 asp 页面中它是 "rEpJZ8IDRfIbFpptDl 84w==" 在 HttpUtility.UrlDecode(Request.QueryString("pId")) 之后
【问题讨论】:
-
原始值是多少不是rEpJZ8IDRfIbFpptDl 84w==?
标签: asp.net query-string urlencode