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

例如:

视图的地址路径:

System.Web.HttpUtility.UrlEncode(内容)

lay-href="/Control/[email protected](Model.Name)"

JS传的地址路径:

 encodeURI(encodeURI(内容))

url="/Control/Index";

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

猜你喜欢

转载自www.cnblogs.com/yueyongsheng/p/11979186.html