I need help with this route map
routes.MapRoute("Blog_Archive",
"Blog/Archive/{year}/{month}/{day}",
new {
controller = "Blog",
action = "archive",
year = "",
month = "",
day = "",
page = 0
});
When I call http://localhost:5060/blog/Archive/2008/11, it picks up the year and month and sends it to the controller. But when I try http://localhost:5060/blog/Archive/2008
it sends it to the controller but the year parameter is null and so are all the other parameters.
Do you have any other Route for Blog/Archive/{something}?
Use the Routing Debugger to see which route actually gets hit, most likely it's not hitting that route.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With