Hello!
I tried to become acquainted with the Routing functionality of .NET 4, to create user and SEO friendly Urls.
I learned how awesome and easy this is resolved in .NET 4, but i run into an issue with the default values of a route:
Assuming i registered following routes in global.asax
routes.MapPageRoute("artikelDE", "{LangCode}/Artikel/{*Params}", "~/Default.aspx", true, new RouteValueDictionary { { "LangCode", "de" } }, new RouteValueDictionary { { "LangCode", "de" } });
routes.MapPageRoute("artikelFR", "{LangCode}/Article/{*Params}", "~/Default.aspx", true, new RouteValueDictionary { { "LangCode", "fr" } }, new RouteValueDictionary { { "LangCode", "fr" } });
So for the artikelDE i have a contstrain off "de" and also a defaul value of "de". Same for artikelFR with "fr"
So I have 3 asp:HyperLinks on my Default.aspx
In the Default.asp ...
Go to the complete details ...