MVC 4: Custom Route
问题 ASP.NET MVC 4 website. Got a database-table named "Locations", which holds only three possible Locations (eg. "CA","NY","AT") The default route would be: http://server/Location/ --- list of Locations http://server/Location/NY --- details of NY-Location How can I create a custom route without the /Location/ - bit? (which I find a bit more nice) So that http://server/NY - details of NY http://server/AT - details of AT .... etc... and http://server/Location --- list of Locations 回答1: A solution