URL中用 encodeURIComponent 进行转码后,如何在asp.net C# 代码中获取URL参数


URL中用 encodeURIComponent 进行转码后,在asp.net C# 后台代码中可以通过
HttpContext.Current.Request.Url.ToString() 获取转码后的完整URL,如果需要获取

Url中传递的“汉字”等参数,再通过截取字符串的方式获取你所需参数。



直接HttpUtility.UrlDecode(Request["参数名称"].ToString())就可以的到汉字了




猜你喜欢

转载自blog.csdn.net/zunguitiancheng/article/details/80996027
今日推荐