Reputation: 569
How to I setup a route of the url /customer/export/billing
to the controller Customer.ExportBilling()
?
When I try this:
routes.MapRoute(
"exportCustomerBilling", "customer/export/billing", new { controller = "Customer", action = "ExportBilling" });
I get a 404, the controller method is not invoked.
Using <%= Html.RouteLink("Export customers for billing", "exportCustomerBilling", null) %>
returns the correct link, clicking on it returns a 404.
Upvotes: 1
Views: 612
Reputation: 26956
You've probably got a more general route registered above the Export Billing route.
Drop one of the Routing Debuggers into your site, and register it in the Global.asax, that will tell you:
You can usually work out what tweaking you need to perform from there.
Upvotes: 1