I have an action in controller:
public ActionResult Close(DocType docType)
{
return View();
}
where DocType is a simple enum. I want to have 2 different links to the same action but with different parameters. I have tried this:
<mvcSiteMapNode title="Accounting" clickable="false" imageUrl="~/Content/Images/Buttons/MenuButtons/billing.png" visibility="path">
<mvcSiteMapNode title="Payments" controller="Payment" action="Index"></mvcSiteMapNode>
<mvcSiteMapNode title="Closing WO" controller="Payment" action="Close" docType="2"></mvcSiteMapNode>
<mvcSiteMapNode title="Closing WS" controller="Payment" action="Close" docType="4"></mvcSiteMapNode>
</mvcSiteMapNode>
But in the menu I have 2 links without any parameters: "/Payments/Close"
What's wrong? How to add parameters into mvcSiteMapNode?
Here are my RouteConfig:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}