Created
October 6, 2010 14:24
-
-
Save DanielOberg/613423 to your computer and use it in GitHub Desktop.
MVC.Net Routes with numbers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Route where an argument must be a number to match | |
routes.MapRoute("NewsDetails", "News/{id}/{title}", | |
new { controller = "News", action = "Details"}, | |
new { id = @"\d+" }); // NOTE THIS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment