【发布时间】:2015-02-05 20:41:05
【问题描述】:
MvcSiteMapProvider v4 从 v3 升级。
我有一条类似的路线
routes.MapRoute(
"SEPageNoAction",
"{controller}/{name}/{id}",
new { controller = "Home", action = "Index", name = UrlParameter.Optional, id = UrlParameter.Optional }, // Parameter defaults
new { name = @"\D+", id = @"\d+" } // Types
);
我正在使用 DynamicNode 在代码中构建节点
我没有设置 Action,或者更确切地说,设置 Action=null
然后我将添加“Name”和“Id”作为 RouteValues。
当我跑步时,我会得到:
键为'KEY'和标题为'TITLE'的节点同时有一个空的'action'和空的'url',这是不允许的
这在 v3 中有效。
发生了什么变化?
【问题讨论】: