页面报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)) ;