页面报400:传URL包含中文等字符浏览器不能识别(编码后能识别)

例如:

视图的地址路径:

System.Web.HttpUtility.UrlEncode(内容)

lay-href="/Control/Index?Name=@System.Web.HttpUtility.UrlEncode(Model.Name)"

JS传的地址路径:

 encodeURI(encodeURI(内容))

url="/Control/Index";

window.location.href = url+"&Name=" + encodeURI(encodeURI(name)) ;

posted on 2019-12-03 20:27  小乐丶  阅读(1165)  评论(3编辑  收藏  举报