Reputation: 6611
I have been benefiting from the advantages of sitemaps for a while now:
I have, up until now, also been using SiteMapProviders
as a routing mechanism. I've been storing a 'routed URL' and a 'handler URL' into each node's Url and Key properties, respectively. I.e. a request comes in, the FindSiteMapNode method is called, and the request is rewritten to the returned node's key.
This works perfectly, but I am aware times are changing and we now have Routing Tables.
After some research, it appears that relationships between pages cannot be inferred from routes. Ergo: "sitemaps cannot be inferred from a routing table". (Am I right?)
Assuming this statement, how do I keep my wonderful sitemaps and keep with the times? Is there a way of having both without masses of code repetition between the two? What specific gains will I receive from Routing Tables over my current approach?
I have looked at: ASP.NET URL Routing with WebForms - Using the SiteMap, which points to http://chriscavanagh.wordpress.com/2009/05/19/asp-net-webform-routing-with-sitemaps/
However, the solution only allows a 1..1 mapping between nodes and routes, respectively. For example, you cannot have many product nodes point to a single route with this method.
Upvotes: 2
Views: 762
Reputation: 21137
"This works perfectly, but I am aware times are changing and we now have Routing Tables."
Why change something that works perfectly for you? I recommend you change nothing based on the information you provided. I understand the want and desire to use the new shinny thing, however, you have something that works and fits your current needs.
Upvotes: 3