I want to map the following URI:
/admin/controller/action/id
to the following:
Controller -> Controller
Action -> Admin_Action
For example:
/admin/Users/Create
Controller -> Users
Action -> Admin_Create
/admin/Users/Delete/1
Controller -> Users
Action -> Admin_Delete(1)
Can I achieve that using routing rules?
I think the following route mapping should work ...
routes.MapRoute("YourRouteName", "admin/controller/action/{id}", new { controller = "Controller", action = "Admin_Action", id = UrlParameter.Optional });
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