我使用MvcSiteMapProvider 3.3.3.0和具有文件MvcSiteMap.sitemap
包含定义两个节点如下:MVCSitemapProvider当前节点没有检测
<mvcSiteMapNode title="Node1" controller="MyController" action="MyAction" type="A" />
<mvcSiteMapNode title="Node2" controller="MyController" action="MyAction" type="B" />
我在的global.asax.cs路由配置的“开箱即用”,这样的网址是:
Node 1: http://server/MyController/MyAction?type=A
Node 2: http://server/MyController/MyAction?type=B
现在,如果我浏览到节点2,我发现MenuHelper.GetCurrentNode()
返回节点1
这是为什么,我有没有办法让MvcSiteMapProvider根据查询字符串参数识别当前节点?