Using Special Symbols in ASP.NET MVC Routes [duplicate]
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.
Try using ( *|\d{1,4})
.
精彩评论