I have created a new route like the following:
routes.MapRoute(
"BlogYMD",
"blog/date/{year}/{month}/{day}",
new { controller = "Blog", action = "Date", year = "2009", month="01", day="01" });
The view simply returns a concatenation of year, month and day. This works fine for URL's like:
http://localhost/blog/date/2009/01/01
However if I enter this URL:
http://localhost/blog/date/2009
I would expect the default values for month and day to be passed to the date method. However they aren't, all the parameters on the method come through as null.
Am I missing something obvious?