我有这样的网址:/%20Account/%20LogOn?ReturnUrl=%2f+Admin%2f+Index
我有两个问题:
1)为什么我%20
之前有Account
和LogOn
?是不是类似空间的东西?
2)如何删除%20
之前Account
和LogOn
?
也许路线有问题?
这是我的班级RegisterRoutes:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
null,
"",
new { controller = "Product", action = "List",category = (string)null,page=1 }) ;
routes.MapRoute(null,
"Page{page}",
new { controller = "Product", action = "List",category = (string)null });
routes.MapRoute(
null,
"{category}",
new { controller = "Product", action = "List", page = 1 });
routes.MapRoute(
null,
"{category}/Page{page}",
new { controller = "Product", action = "List"});
routes.MapRoute(null, " {controller}/ {action}");
}