我遇到以下问题。我设置了 MVC SiteMap,但有一个节点需要保存(保留)参数。从技术上讲,问题解释:
我有路线:Agent/Checklists/Templates,从那里我打开特定模板,Agent/Checklists/EditTemplate/1(其中 1 是 id)然后从那里我打开新页面,即 Agent/Processes/Add
在最后一页我有面包屑:模板>编辑模板>添加进程
现在,当我单击编辑模板时,我希望将我重定向到 Agent/Checklists/EditTemplate/1
我尝试将 SiteMapPreserveRouteData 装饰器放在 Action 上,但它说它已过时。
这是我的 Mvc.sitemap
<mvcSiteMapNode title="Templates" controller="Checklists" action="Templates" area ="Agent">
<mvcSiteMapNode title="Edit Template" controller="Checklists" action="EditTemplate" area="Agent" preservedRouteParameters="id">
<mvcSiteMapNode title="Add Process" controller="Processes" action="Add" area="Agent" preservedRouteParameters="id, id" />
<mvcSiteMapNode title="Process Configuration" controller="Processes" action="Edit" area="Agent" preservedRouteParameters="token" />
</mvcSiteMapNode>
</mvcSiteMapNode>
谢谢