Skip to content

Instantly share code, notes, and snippets.

@DanielOberg
Created October 6, 2010 14:24
Show Gist options
  • Save DanielOberg/613423 to your computer and use it in GitHub Desktop.
Save DanielOberg/613423 to your computer and use it in GitHub Desktop.
MVC.Net Routes with numbers
// 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