MVC for everything that is only numeric
1 answer
I'm not sure I understood this question, but as far as I know you can just provide regexes in a constraint dictionary.
I think there is even an example for this in MSDN Mode :
reportRoute.Constraints = new RouteValueDictionary {
{ "locale", "[a-z]{2}-[a-z]{2}" },
{ "year", @"\d{4}" } };
based on this, I think you should write:
Constraints = new RouteValueDictionary(new { filename = @"\d+" })
+4
source to share