Configure XML Node with additional parameters (route data)

Jan 24, 2011 at 5:58 PM

I would like to know how you are supposed to configure additional route data for a sitemap node in this tool? Previously, I could use ?param1=1 to perform this and need something similar for the Mvc side. I have reporting menu items that are configured for similar parameter pages but run different reports.

Am I supposed to create custom routes for each report in code instead of the XML file? I don't think this is correct but I cannot see any information on this other than dynamic parameters are supported. When the menu is built, I want the item clicked to set the report to be created via the menu item.

Jan 25, 2011 at 11:18 AM

Can you post a sample controller and the URLS you would like to create?

Jan 25, 2011 at 2:41 PM
Edited Jan 25, 2011 at 4:44 PM

I don’t have the exact code handy, but it is basically like below:


Controller Action:



<HttpGet()> Overridable Function DepositDateSearch(ByVal reportName as String) As ActionResult

Return View(model)

End Function




<mvcSiteMapNode area=”Validation” controller=”Reports” action=”DepositDateSearch” … />


So basically I previously had been using the regular sitemap to create the menu with URL’s and that was working fine but of course security trimming was not working and so I am looking to move to this so I can obtain that functionality without a lot of extra work / coding. The urls would be “~/Validation/Reports/DepositDateSearch?reportName” and I can create the custom route to make it “~/Validation/Reports/DepositDateSearch/rptSomeReport” instead but I don’t think that gains me anything from the menu stand point and the sitemap.


Now I do understand that using the parameter like this would prevent us from security a specific report but all reports here have the same security. If we needed individual security, I would probably create individual routes or actions for each report that would render the common view for the search. Maybe that is exactly what I have to do but right now I am looking for options so I better understand what is available to make the correct choice.


BTW, the EnvironmentalAuthorizeAttribute used is a custom one derived from the MVC to intercept the Role names and convert them on Set to QA, PROD, etc.. appropriately based on where the code is deployed.