0

I want to use the url such as "/ControllerName/ActionName/Id" Id - only digits or null. But when I use regular expression in MapRoute, "\d{1,4}", I see the exception - error404 page, when I'm trying to see /ControllerName/ActionName/" page.

Also, I don't know, how I can catch exception with special symbol - ". Please, help.Thanx.

DaveRandom
  • 87,921
  • 11
  • 154
  • 174
Peter
  • 3
  • 2

1 Answers1

1

Try using ( *|\d{1,4}).

Roman
  • 19,581
  • 6
  • 68
  • 84