following is my sitemap code :
<mvcSiteMapNode title="Partner" controller="Partner" key="Partner" action="ShowPartners" >
<mvcSiteMapNode title="ISP" controller="ISP" key="ISP" action="ShowPartnersIsps" preservedRouteParameters="Id" >
<mvcSiteMapNode title="Operator" controller="Operator" key="Operator" action="ShowIspsOperators" preservedRouteParameters="Id" >
<mvcSiteMapNode title="Subscriber" controller="Subscriber" key="Subscriber" action="ShowOperatorsSubscribers" preservedRouteParameters="Id" >
<mvcSiteMapNode title="Router" controller="Router" key="Router" action="ShowSubscribersRouters" preservedRouteParameters="Id" />
</mvcSiteMapNode>
</mvcSiteMapNode>
</mvcSiteMapNode>
</mvcSiteMapNode>
following is my route.config
routes.MapRoute(
"GetPartnerRoute",
"Partner/ShowPartners/{search}",
new { controller = "Partner", action = "ShowPartners", Search = UrlParameter.Optional }
);
routes.MapRoute(
"GetISPRoute",
"ISP/ShowPartnersIsps/{Id}/{Search}",
new { controller = "ISP", action = "ShowPartnersIsps", Id = UrlParameter.Optional, Search = UrlParameter.Optional }
);
routes.MapRoute(
"GetOperatorRoute",
"Operator/ShowIspsOperators/{Id}/{Search}",
new { controller = "Operator", action = "ShowIspsOperators", Id = UrlParameter.Optional, Search = UrlParameter.Optional }
);
routes.MapRoute(
"GetSubscriberRoute",
"Subscriber/ShowOperatorsSubscribers/{Id}/{Search}",
new { controller = "Subscriber", action = "ShowOperatorsSubscribers", Id = UrlParameter.Optional, Search = UrlParameter.Optional }
);
routes.MapRoute(
"GetRouterRoute",
"Router/ShowSubscribersRouters/{Id}/{Search}",
new { controller = "Router", action = "ShowSubscribersRouters", Id = UrlParameter.Optional, Search = UrlParameter.Optional }
);
the id parameters is not same for all node.
in above situation.
each node has different "Id" value. which not similar for every node. by renaming "Id" i can achieve what i expected. but i cant change the name of "Id". so when i goes to child node which having parameter "Id" it sets similar value to its parent node.
following is my code after inspect :
Home >
<a href="/Partner/ShowPartners" title="Partner">Partner</a>
>
<a href="/ISP/ShowPartnersIsps/268e4984-0923-4db7-8dd3-78564663e4d1" title="ISP">ISP</a>
>
<a href="/Operator/ShowIspsOperators/268e4984-0923-4db7-8dd3-78564663e4d1" title="Operator">Operator</a>
>
<a href="/Subscriber/ShowOperatorsSubscribers/268e4984-0923-4db7-8dd3-78564663e4d1" title="Subscriber">Subscriber</a>
>
"268e4984-0923-4db7-8dd3-78564663e4d1" is similar for every node. which should be different.
how can i achieve this. please help